Hosting external subdomain w/Apache on CentOS7?

I need some help. Im an amateur *nix user, playing around with things. I know enough to do the bare minimum of what I need to do, to host a telnt process.

I’m now branching out to try to add some simple web page hosting in my droplet, using an outside domain provider that I have a subdomain with,

I followed the tutorial here:

I start out with the basic Apache default message, which is fine. But I’m trying to point the subdomain at the IP, and have the subdomain point to the appopriate directory.

I get to step 4 to create the virutal host. My virtual host is set up as follows:

<VirtualHost *:80> ServerName DocumentRoot /var/www/bjzbackup/public_html ErrorLog /var/www/bjzbackup/error.log CustomLog /var/www/bjzbackup/requests.log combined </VirtualHost>

I received no errors in enabling the symbolic link in step 5.

When I restart apache, I get the following error: Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.

When I look at the systemctl status, I get the following: ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2018-04-07 21:25:52 UTC; 48s ago Docs: man:httpd(8) man:apachectl(8) Process: 5454 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 5451 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 5451 (code=exited, status=1/FAILURE)

Apr 07 21:25:52 hotbmush-host systemd[1]: Starting The Apache HTTP Server… Apr 07 21:25:52 hotbmush-host httpd[5451]: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using ::1. Set the ‘ServerName’ directive globally to suppress this message Apr 07 21:25:52 hotbmush-host systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Apr 07 21:25:52 hotbmush-host kill[5454]: kill: cannot find process “” Apr 07 21:25:52 hotbmush-host systemd[1]: httpd.service: control process exited, code=exited status=1 Apr 07 21:25:52 hotbmush-host systemd[1]: Failed to start The Apache HTTP Server. Apr 07 21:25:52 hotbmush-host systemd[1]: Unit httpd.service entered failed state. Apr 07 21:25:52 hotbmush-host systemd[1]: httpd.service failed.

Any help you guys can give would be appreciated. I don’t think the stuff from the journal is relevant, but I can post it if need-be.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I figured it out. The tutorial does not account for write permissions; once I changed where the logs were writing to, it worked like a charm.

ErrorLog /var/log/httpd/mydomain_com_error.log CustomLog /var/log/httpd/mydomain_com_requests.log combined

Those two worked for anyone who comes across this.

Do you have a cNAME in the DNS Zone file for the domain connected to the IP address of the hosting server?