they are 3 web servers already installed on the system nginx, httpd, light_httpd
Activate the one you are familiar with - in my case httpd Apache -
systemctl start httpd
systemctl enable httpd
and configure web files rather from default /var/www/html to located in another DIR eg /var/srv/public/
this requires Virtual Hosts setup or just change in Apache conf files the default DIR and apply SELINUX CMD further below??? anything else? are onkly these settings change?
Bible Linux ebook extract
1)
To help you understand the settings that come in the default httpd.conf fi le, I’ve
displayed some of those settings with descriptions below. I have removed comments and
rearranged some of the settings for clarity.
The following settings show locations where the httpd server is getting and putting
content by default:
Code: Select all
ServerRoot "/etc/httpd"
Include conf.d/*.conf
ErrorLog logs/error_log
CustomLog "logs/access_log" combined
DocumentRoot "/var/www/html"
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
5. If SELinux is in Enforcing mode (which is it by default in Fedora and RHEL),
set the SELinux fi le context properly on the content so SELinux allows the
httpd daemon to access the content:
Code: Select all
# chcon -R --reference=/var/www/html/ /var/srv/public/