Start a new topic

How to upload multiple websites on my vps

can i run multiple websites on single server IP address?

I am trying to host multiple websites using virtual host.

i upload my site on specific folder

set DirectryRoot too

add one entry to /etc/hosts page too

like 127.0.0.1 example.com

 

in file etc/httpd/conf.model.d/example.conf hosted two virtual site

<VirtualHost *:80>

    ServerName www.example1.co.in

    ServerAlias .co.in

    DocumentRoot /var/www/html/example1.co.in/public_html 

    ErrorLog /var/www/html/example1.co.in/error.log 

    CustomLog /var/www/html/example1.co.in/requests.log combined 

</VirtualHost>

 

<VirtualHost *:80>

    ServerName www.example2.co.in

    ServerAlias example2.co.in

    DocumentRoot /var/www/html/example2.co.in/public_html

    ErrorLog /var/www/html/example2.co.in/error.log

    CustomLog /var/www/html/example2.co.in/requests.log combined

</VirtualHost>


but only one site is running means example1.co.in

please give me a solution...


1 Comment

* Do you own the domains example1.co.in and example2.co.in?

* Have you set up your DNS server(s) to point to your web server's IP address for both (www.)example1.co.in and (www.)example2.co.in?

* I assume that your "virtual host" configuration is done OK on your web server's software (Apache, nginx, ...).

Login or Signup to post a comment