Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is emergency.

I just want to do one stupid simple thing. I do not want to have dom logs. That's it.

So I edit vconf.local and rebuild httpd.conf.

Some error shows up like one domain has ownership conflict. So what? I just go ahead and restart apache

root@host [/var/cpanel/templates/apache2]# vi vhost.local
root@host [/var/cpanel/templates/apache2]# /usr/local/cpanel/bin/apache_conf_distiller --update
info [apache_conf_distiller] 'local' datastore in use (/var/cpanel/conf/apache/local)
info [apache_conf_distiller] Missing IP for domain host.buildingsuperteams.com, using 67.159.44.4
info [apache_conf_distiller] Missing port for domain host.buildingsuperteams.com, using 80
info [apache_conf_distiller] Missing user for domain host.buildingsuperteams.com, using nobody
info [apache_conf_distiller] Missing group for domain host.buildingsuperteams.com, using nobody
info [apache_conf_distiller] Missing ServerName for domain host.buildingsuperteams.com, using host.buildingsuperteams.com
info [apache_conf_distiller] Domain ownership conflict detected for buildingsuperteams.com, users nobody, building
Distilled successfully
root@host [/var/cpanel/templates/apache2]# /usr/local/cpanel/bin/build_apache_conf
info [build_apache_conf] 'local' datastore in use (/var/cpanel/conf/apache/local)
info [build_apache_conf] Missing IP for domain host.buildingsuperteams.com, using 67.159.44.4
info [build_apache_conf] Missing port for domain host.buildingsuperteams.com, using 80
info [build_apache_conf] Missing user for domain host.buildingsuperteams.com, using nobody
info [build_apache_conf] Missing group for domain host.buildingsuperteams.com, using nobody
info [build_apache_conf] Missing ServerName for domain host.buildingsuperteams.com, using host.buildingsuperteams.com
info [build_apache_conf] Domain ownership conflict detected for buildingsuperteams.com, users nobody, building
Built /usr/local/apache/conf/httpd.conf OK
root@host [/var/cpanel/templates/apache2]# /etc/init.d/httpd -k graceful
root@host [/var/cpanel/templates/apache2]# service httpd status

Looking up localhost
Making HTTP connection to localhost
Sending HTTP request.
HTTP request sent; waiting for response.
Retrying as HTTP0 request.
Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/whm-server-status
root@host [/var/cpanel/templates/apache2]#

If I type service httpd restart it simply get out WITHOUT disclosing any error message

I check cpanel error log to no result

The ownership conflict happens most likely because the main domain is buildingsuperteams.com and yet I created another user to handle buildingsuperteams.com so I can change what's displayed when people access my IP

Note: While the comment is correct that the server works after doing service httpd start, the output strongly suggest that the httpd server has been online all along for 15 minutes. It's as if all I really needed to do is to actually just wait. There will be some follow up questions.

lynx: Can't access startfile http://localhost/whm-server-status
root@host [/var/cpanel/templates/apache2]# service httpd start
httpd (pid 2516) already running
root@host [/var/cpanel/templates/apache2]# service httpd status
                       Apache Server Status for localhost

   Server Version: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips
          mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

   Server Built: Dec 20 2012 10:45:38
     __________________________________________________________________

   Current Time: Monday, 31-Dec-2012 22:08:15 CST
   Restart Time: Monday, 31-Dec-2012 21:52:58 CST
   Parent Server Generation: 3
   Server uptime: 15 minutes 16 seconds
share|improve this question
    
service httpd start ? Doesn't look like you actually started apache. –  Grumpy Jan 1 '13 at 4:07
    
It works. But how? Doesn't restart automatically start? Also why doesn't it happen automatically when I reboot server like usual? I guess you can turn this into an answer. –  Septiadi Agus Jan 1 '13 at 4:09

1 Answer 1

up vote 5 down vote accepted
service httpd start

Doesn't look like you actually started apache.

It's possible the restart with /etc/init.d/httpd -k graceful command failed. Thus, there was no httpd service running. Or that the graceful was taking an extended period of time due to stalling process.

cpanel comes with various services that constantly checks whether an essential (as defined by cpanel) service is down or not and attempts to "automagically" restart that service. However, there is delay between when these checks are made. So, the start up procedure is not immediate.

When you boot the machine for the first time, it's not cpanel's checker that checks for their runtime but the OS's boot orders which include essential services.

For future reference, the command to restart (non graceful) is

service httpd restart

Additionally, you can view error_log at /usr/local/apache/logs/error_log

share|improve this answer
    
Thanks Peter. Wow –  Septiadi Agus Jan 1 '13 at 4:23
    
So service httpd restart doesn't start the service if it's not started in the first place? –  Septiadi Agus Jan 1 '13 at 4:26
    
@SeptiadiAgus service httpd restart is equivalent to service httpd stop followed by service httpd start. It will start the service if it wasn't running to begin with. But the first will fail. –  Grumpy Jan 1 '13 at 4:28
    
I understand. So basically because service httpd stop fails it doesn't try the start part. Are you sure? –  Septiadi Agus Jan 1 '13 at 4:31
    
No, I just said it will still do the "start" even though "stop" will fail. –  Grumpy Jan 1 '13 at 4:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.