简体   繁体   中英

configuring apache for multiple virtual hosts on centos7

I have a domain www.xxx.com which we have bought from a hosting service. I pointed that domain to main ip of my VPS. then i created a virtual host for it and mentioned it's root directory and the restarted apache, all worked fine and domain is working.

Now the problem is this server is also our development server and we need to deploy certain projects there.

i try to access them like xx.xx.xx.xx/otherproject but page not found error occurs. I have created a virtual host with the required url and mentioned it's directory.

But still page not found error occurs.

They are several aspects you might want to check :

  1. DNS record where your www.xxx.com domain name points to your IP You may add an A RECORD with the same IP to another subdomain for example dev.xxx.com

  2. if you create a virtual host on sites_available you might have not enabled it with sudo a2ensite dev.xxx.com.conf

  3. there is a huge list of possible issues here. Maybe you could paste the essential part of your virtual host config files ? You might also check the log files located at /var/log/apache2/ to see what is happening.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM