New dedicated server, imported everything over, mysql works, just need help setting default page.

#1
Hey, I use apache 2, I've installed fully/correctly the xenforo, I tested this by doing my ip then /var/www.., I managed to get on my site, and everything was working. Now I'm using apache, I want to set the default page for mydomain.com to be the xenforo which is located at /var/www/backup. This is what I do if I go to my domain right now:


Not Found
The requested URL / was not found on this server.


I dont know how to change this, and I'm worried about changing things as I've just managed to import the mysql db, and other things needed.

Any help is appreciated, thanks!
 
#2
Code:
vi /etc/apache2/sites-enabled/redirect
add this
Code:
<VirtualHost *:80>
        ServerName forums.towernetwork.eu
        DocumentRoot "/var/www/forums/"
</VirtualHost>
Replace forums.towernetwork.eu with your domain
replace /var/www/forums/ with your path /var/www/backup/

then press "esc" type in ":wq!" and press enter (mind the on the end)

all that this will do is; if you connect with example.domain it will use /folder/x/ path as root folder
you can have it like this


Code:
<VirtualHost *:80>
        ServerName forums.towernetwork.eu
        DocumentRoot "/var/www/forums/"
</VirtualHost>
<VirtualHost *:80>
        ServerName towernetwork.eu
        DocumentRoot "/var/www/main/"
</VirtualHost>
and if you connect with towernetwork.eu you will use the /main/ directory, if you connect with forums.towernetwork.eu you will use /forums/ directory.

I hope it helper, i suppose you needed that. If not, sorry i got your wrong... (i am trying to do everything a bit fast, since i am searching how to do this, if you can help me, much love <3 )

Regards,
~Lazos :)
 
#3
Code:
vi /etc/apache2/sites-enabled/redirect
add this
Code:
<VirtualHost *:80>
        ServerName forums.towernetwork.eu
        DocumentRoot "/var/www/forums/"
</VirtualHost>
Replace forums.towernetwork.eu with your domain
replace /var/www/forums/ with your path /var/www/backup/

then press "esc" type in ":wq!" and press enter (mind the on the end)

all that this will do is; if you connect with example.domain it will use /folder/x/ path as root folder
you can have it like this


Code:
<VirtualHost *:80>
        ServerName forums.towernetwork.eu
        DocumentRoot "/var/www/forums/"
</VirtualHost>
<VirtualHost *:80>
        ServerName towernetwork.eu
        DocumentRoot "/var/www/main/"
</VirtualHost>
and if you connect with towernetwork.eu you will use the /main/ directory, if you connect with forums.towernetwork.eu you will use /forums/ directory.

I hope it helper, i suppose you needed that. If not, sorry i got your wrong... (i am trying to do everything a bit fast, since i am searching how to do this, if you can help me, much love <3 )

Regards,
~Lazos :)
Thanks for the response!


When I do edit the redirect file, it's empty, should it already have stuff in it, or not? Just making sure before I change it


Thanks!
 
#7
uggh you do not do 123.456.78.9/var/www/yourfolder

if it's like this: /var/www/yourfolder
you use 123.456.78.9/yourfolder
 

Brogan

XenForo moderator
Staff member
#14
There doesn't appear to be any content there or at /backup.

Have you set up the nameservers?

Why do you have XF installed in /backup if you want it to resolve to the domain root?
 
#15
There doesn't appear to be any content there or at /backup.

Have you set up the nameservers?

Why do you have XF installed in /backup if you want it to resolve to the domain root?
1 How would I setup the nameservers?

2 I can move it, where would I put it?
 
Top