Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
Great stuff, but 2 things happened…
Does it mean I have to fix (1) by adding the default directory as another virtual server? But how do I fix (2)?
Thanks in advance.
James
This comment has been deleted
It’s counter-intuitive to include “sudo” in any of the commands in this (and any other digital ocean) tutorial(s). If I/we have access to install/start/stop apache or edit vhosts, I don’t need to use sudo.
I have been setting up Linux web servers since the late 1990’s I have tried all of the different methods through RedHat based Linuxes. I have always embraced SELinux, though I have cursed it many times.
This tutorial led me for the first time to create and use the enabled sites directory and stay out of the default Apache directory. since I am setting up a development server at this time I liked using the “setsebool -P httpd_unified 1” command. This command was the big deal for me in this tutorial.
Thanks for your efforts, you did a great job.
I also had to run
sudo firewall-cmd --add-service=http
sudo firewall-cmd --add-service=https
I’ve followed all of your instructions just changed servername to www.webserver.com. But face the problem after test this by navigating to http://webserver.com >> “Server not found”. But when I try to navigate it to server’s IP http://ip_server >> display “/var/www/example.com/html/index.html”. Success! The example.com…
After I had run this command “sudo systemctl restart httpd”, I got this and I have been battling it: “Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.”
I don’t need to change the log folder to httpd_log_t as it seems it’s already writing to log files while having httpd_sys_content_t as the SELinux context.
This is my current ls -dZ output:
drwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 /var/www/cbdhempoilusa.com/log
On the other hand, for another virtual host, I’ve set this as you explained in this tutorial but like I’ve said - there is no visible difference.
Using Centos 7 and having apache:apache as the ownership of the files