Hi these are the configuration files for my Apache on CentOS 8.
The DNS (proiecto.net, www.proiecto.net and soporte.proiecto.net) are well-created pointing to the IP of my Centos server.
My file: /etc/httpd/conf.d/vhosts.conf:
======================================
<VirtualHost *:80>
ServerName proiecto.net
ServerAlias www.proiecto.net
DocumentRoot /var/www/html
</VirtualHost>
<VirtualHost *:80>
ServerName soporte.proiecto.net
ServerAlias soporte.proiecto.net
DocumentRoot /home/proiecto/soporte/html
</VirtualHost>
My file: /etc/hosts:
======================================
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.redhat.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
#
# The following lines are desirable for IPv4 capable hosts
127.0.0.1 proiecto-centos proiecto-centos
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4
127.0.0.1 www.proiecto.net
127.0.0.1 proiecto.net
127.0.0.1 soporte.proiecto.net
# The following lines are desirable for IPv6 capable hosts
::1 proiecto-centos proiecto-centos
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
The HTML file for soporte.proiecto.net exists in:
/home/proiecto/soporte/html/index.html
and should show only one basic message: “Hello world Soporte”
When I enter the site www.proiecto.net it shows very well,
but when I enter the site soporte.proiecto.net it shows the default
Centos Apache configuration page (it should show a basic page with “Hello World”)**
Any suggestions? Thank you very much.
Edward Ocando Venezuela
edward.ocando@gmail.com
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!
Hi there,
I believe that this could be due to the permissions of your /home/proiecto/soporte/html/ directory.
What I could suggest is following steps 4 and 5 here on how to setup your Vhosts and how to adjust your SELinux permissions on CentOS 8:
Let me know how it goes! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.