I am trying configure multisite in centos 8 in Digital Ocean in Apache server, also called httpd for centos. I am following this tutorial. but skipped the permission and SELniux part.
The three sites i have :
- donatedrop.com
- gobeshona.news
- neomtech.xyz
Among these sites : gobeshona.news
is working fine. But donatedrop.com
and neomtech.xyz
are pointing to same same means to the donatedrop.com
folder's html file.
donatedrop.com.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/donatedrop.com/
ServerName www.donatedrop.com
ServerAlias donatedrop.com
ErrorLog /var/www/html/donatedrop.com/logs/donatedrop-error_log
CustomLog /var/www/html/donatedrop.com/logs/donatedrop-common_log common
</VirtualHost>
gobeshona.news.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/gobeshona.news/
ServerName www.gobeshona.gobeshonaws
ServerAlias gobeshona.news
ErrorLog /var/www/html/gobeshona.news/logs/gobeshona-error_log
CustomLog /var/www/html/gobeshona.news/logs/gobeshona-common_log common
ErrorDocument 404 /index.html
</VirtualHost>
neomtech.xyz.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/neomtech.xyz/
ServerName www.neomtech.xyz
ServerAlias neomtech.com
ErrorLog /var/www/html/neomtech.xyz/logs/neomtech-error_log
CustomLog /var/www/html/neomtech.xyz/logs/neomtech-common_log common
</VirtualHost>
I have restarted the server and checked with some other browsers also.
I have checked the configuration.
[root@neomtech ~]# ls -lZ /var/www/html/donatedrop.com/logs
total 20
-rw-r--r-- 1 root root ? 15832 Nov 13 23:41 donatedrop-common_log
-rw-r--r-- 1 root root ? 187 Nov 13 14:30 donatedrop-error_log
[root@neomtech ~]# ls -lZ /var/www/html/neomtech.xyz/logs
The folder's where i have kept html files.
[root@neomtech ~]# ls -l /var/www/html/ -a
total 8
drwxr-xr-x 5 root root 70 Nov 13 05:41 .
drwxr-xr-x 4 root root 33 Nov 13 01:47 ..
drwxr-xr-x 3 root root 36 Nov 13 06:03 donatedrop.com
drwxr-xr-x 3 root root 4096 Nov 13 12:22 gobeshona.news
drwxr-xr-x 3 root root 4096 Nov 14 00:21 neomtech.xyz
httpd -S
[root@neomtech ~]# httpd -S
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, usi ng fe80::b894:ccff:fe8a:8baa. Set the 'ServerName' directive globally to suppress this mes sage
VirtualHost configuration:
*:80 is a NameVirtualHost
default server www.donatedrop.com (/etc/httpd/sites-enabled/donatedrop.com.conf:1 )
port 80 namevhost www.donatedrop.com (/etc/httpd/sites-enabled/donatedrop.com.con f:1)
alias donatedrop.com
port 80 namevhost www.gobeshona.gobeshonaws (/etc/httpd/sites-enabled/gobeshona.n ews.conf:1)
alias gobeshona.news
port 80 namevhost www.neomtech.xyz (/etc/httpd/sites-enabled/neomtech.xyz.conf:1)
alias neomtech.com
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex default: dir="/etc/httpd/run/" mechanism=default
Mutex cache-socache: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex lua-ivm-shm: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
PidFile: "/etc/httpd/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48