Hello everybody, I am trying to run 2 instances of apache on centos since 2 weeks with no lucks :S, exactly on the same IP address but different port. I've set up two configuration as follow: /etc/httpd and /etc/httpd2, and I duplicated the httpd service, so now I have 2 httpd service each one run an httpd conf. Now when I am trying to restart the first httpd service, it give the following httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName but the status is OK. And when I try to restart the httpd2 service, it give the same error with a failed status. Some internet research told that I have to put a serverName in httpd.conf (server name was commented) so I change it with the hostname of my VM. Now when I try to restart httpd2 the error message disappear, but his status is always failed. N.B. My first httpd.conf don't have a serverName. My /etc/hosts contain only: 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 Any help will be appreciated. Thank you Ahmad HC This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
Woehrle Hartmut SBB CFF FFS (Extern)
2013-May-27 08:33 UTC
[CentOS] Run multiple instance of apache
>Hello everybody, > >I am trying to run 2 instances of apache on centos since 2 weeks with no lucks :S, exactly on the same IP address but different port. >I've set up two configuration as follow: >/etc/httpd and /etc/httpd2, and I duplicated the httpd service, so now I have 2 httpd service each one run an httpd conf. >Why two services? To have 2 or more Webservers at the same maschine with one or several IPs, that's why apache invented virtual hosts. Set up vhosts for every instance you want to run. See http://httpd.apache.org/docs/2.4/vhosts/examples.html Cu Hartmut>Now when I am trying to restart the first httpd service, it give the following >httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName but the status is OK. And when I try to restart the >httpd2 service, it give the same error with a failed status. >Some internet research told that I have to put a serverName in httpd.conf (server name was commented) so I change it with the hostname of my VM. > >Now when I try to restart httpd2 the error message disappear, but his status is always failed. >N.B. >My first httpd.conf don't have a serverName. >My /etc/hosts contain only: > 127.0.0.1 localhost.localdomain localhost >::1 localhost6.localdomain6 localhost6 > >Any help will be appreciated. > >Thank you > >Ahmad HCThis message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
Am Mon, 27 May 2013 08:15:52 +0000 schrieb "HAJJ CHEHADE, Ahmad" <ahmad.hajj-chehade at capgemini.com>:> Hello everybody, > > I am trying to run 2 instances of apache on centos since 2 weeks with > no lucks :S, exactly on the same IP address but different port. I've > set up two configuration as follow: /etc/httpd and /etc/httpd2, and I > duplicated the httpd service, so now I have 2 httpd service each one > run an httpd conf. >Try to follow this http://wiki.apache.org/httpd/RunningMultipleApacheInstances FreeBSD has support for this out of the box. You might want to take a look at how exactly FreeBSD handles the configuration. You will most likely also need to specify different log-, lock- and pid-files/paths. I've done it on FreeBSD and it works like a charm. Regards, Rainer
On 27.Mai.2013, at 10:15, HAJJ CHEHADE, Ahmad wrote:> I am trying to run 2 instances of apache on centos since 2 weeks with no lucks :S, exactly on the same IP address but different port. > I've set up two configuration as follow: > /etc/httpd and /etc/httpd2, and I duplicated the httpd service, so now I have 2 httpd service each one run an httpd conf. > > Now when I am trying to restart the first httpd service, it give the following > httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName > but the status is OK. And when I try to restart the httpd2 service, it give the same error with a failed status. > Some internet research told that I have to put a serverName in httpd.conf (server name was commented) so I change it with the hostname of my VM. > > Now when I try to restart httpd2 the error message disappear, but his status is always failed.selinux maybe? have a look at /var/log/audit/auditd.log while starting httpd2. -- Markus