Why does the virtual domain doesn't work when my server's restarted? I have to login to DirectAdmin and restart apache service from there to make it works.
Look at the end of the line you will see www running in 2 different locations. You can check /usr/local/etc/rc.d/ and disable the apache second apache from starting up, and you can kill it with the process id the above is 438.
When the server restarted, I got one run under root and several run under www. All run from the same location. But when I run httpd restart, all process run under www gone and replaced with process run under apache.
I have apache.sh, apache.sh.dist, and httpd in /usr/local/etc/rc.d directory. I suspect apache.sh or apache.sh.dist which make this problem occured. Am I right?
We don't include the "apache.sh" script, but only use the "httpd" script (/usr/local/etc/rc.d/httpd) .. so delete or rename the apache.sh script to something else so that the "boot.sh" script can call httpd.