Mobile app version of vmapp.org
Login or Join
Jessie594

: How to add multiple websites on a single IP address? I have a VDS server and a dedicated IP address. The question is how to add multiple sites in a single domain? For example I have 3 sites

@Jessie594

Posted in: #Apache #Domains #IpAddress #Vps

I have a VDS server and a dedicated IP address. The question is how to add multiple sites in a single domain?
For example I have 3 sites as below:

company.co webdesign.com www.inet.com

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

2 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

This is a good tutorial on hosting multiple websites with apache2, note the use of a2ensite command over creating symlinks
www.debian-administration.org/articles/412

10% popularity Vote Up Vote Down


 

@Hamm4606531

In 000-default (usually in /etc/apache2/sites-enabled/000-default)

You can use the VirtualHost tag to separate different sites.

<VirtualHost *:80>
DocumentRoot /var/www/example1
ServerName www1.example.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /var/www/example2
ServerName www2.example.com
</VirtualHost>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme