- Jul 18, 2015
- 635
- 588
- 157
Hey, in this post im gonna explain, how to forward 2 domains (in this case forum.mydomain.us and download.mydomain.us) into different folders (in this case /var/www/forum/ and /var/www/download). This will only work if you use an Apache server as your webserver.
First you should connect to your server through putty. Now you should install an editor. I'm gonna use nano. To install it, type:
Sorry for my english, im german
First you should connect to your server through putty. Now you should install an editor. I'm gonna use nano. To install it, type:
Now we create a new virtual host. I'll name it forum because my domain is forum.mydomain.us.apt-get install nano
Now type the following in your .confnano /etc/apache2/sites-available/forum.conf
Now, we create a second host and name it download.conf. We add the same stuff as in the forum.conf, but we have to change some things like the DocumentRoot etc.<VirtualHost *:80>
ServerName forum.mydomain.us
DocumentRoot /var/www/forum/
<Directory /var/www/foum/>
Options FollowSymLinks MulitViews
AllowOverride All
</Directory>
nano /etc/apache2/sites-available/download.conf
If you done this, you have to enable the .conf's and restart your apache server<VirtualHost *:80>
ServerName download.mydomain.us
DocumentRoot /var/www/download/
<Directory /var/www/download/>
Options FollowSymLinks MulitViews
AllowOverride All
</Directory>
a2ensite forum.conf
a2ensite download.conf
If you made everything right, it should work now If there are still any questions, feel free to ask me./etc/init.d/apache2 reload
Sorry for my english, im german