virtual host problem

General support questions
Post Reply
nike
Posts: 72
Joined: 2018/05/07 14:05:24

virtual host problem

Post by nike » 2023/07/06 12:45:06

Sir,
I have one apache VPS web server on centos 7. Also i am not using plesk or cpannel . One website is running fine but when i going to host another domain from the same server it is not running perfectly. If i run second domain's website using yyyy.com or https://yyyy.com sometimes it automatically redirects to 1st one( xxxx.com ) specially it happens on https://yyyy.com . But i already redirect it in a non-ssl.conf file like this

<VirtualHost *:80>
ServerName yyyy.com
Redirect "/" "https://www.yyyy.com"
</VirtualHost>


Below is httpd -S result

VirtualHost configuration:
*:80 is a NameVirtualHost
default server www.xxxx.com (/etc/httpd/conf.d/non-ssl.conf:1)
port 80 namevhost www.xxxx.com (/etc/httpd/conf.d/non-ssl.conf:1)
port 80 namevhost yyyy.com (/etc/httpd/conf.d/non-ssl.conf:7)
*:443 is a NameVirtualHost
default server www.xxxx.com (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost www.xxxx.com (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost www.yyyy.com (/etc/httpd/conf.d/yyyy.conf:1)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/site"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="PPPPP" id=1001
Group: name="PPPP" id=1001

Please any help....

Post Reply