
Basher52 wrote:This could/should have been placed under General Networking even though I use Fedora. Or just tell me where you want it all
I use IP-based Virtual Host as I think this seems to be the simplest to set up and it sure has the least drawback.
Now when we're still trying to get it up and running fully with all the correct information we noticed that we kinda need a test site of them both.
My question now is, how to do this as the best/easiest way?
one site, xxx.se has one IP address and that is now pointing to this server(but the webshop aint up yet due to incorrect prices, logos etc)
the other site(IP not pointing here yet)
Both these sites needs some sort of a test version of what is running live.
I was thinking like this:
www.xxx.se has a /var/www/html/xxx/ and the test site's directory is xxxtest/ and the same with the other one.
how can I do this or do I really need 4 different NICs to get different V-hosts?
Is there a way to like use: www.xxx.se for the public site and use: www.xxx.se/xxxtest for the test site?



<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html/tperacing
ServerName xenonlyse.se
ErrorLog logs/tperacing.se-error_log
CustomLog logs/tperacing.se-access_log common
</VirtualHost>
<VirtualHost *:443>
ServerAdmin root@localhost
DocumentRoot /var/www/html/tperacing
ServerName xenonlyse.se
ErrorLog logs/tperacing.se-error_log
CustomLog logs/tperacing.se-access_log common
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
</VirtualHost>
[root@webserver conf.d]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Sun Feb 01 12:24:22 2009] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[ OK ]
[root@webserver conf.d]#

Alias /tperacing /var/www/html/tperaing
<Directory /var/www/html/tperaing/>
order allow,deny
allow from all
</Directory>
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html/tperacing
ServerName xenonlyse.se
ErrorLog logs/tperacing.se-error_log
CustomLog logs/tperacing.se-access_log common
</VirtualHost>
<VirtualHost *:443>
ServerAdmin root@localhost
DocumentRoot /var/www/html/tperacing
ServerName xenonlyse.se
ErrorLog logs/tperacing.se-error_log
CustomLog logs/tperacing.se-access_log common
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
</VirtualHost>



Alias /tpetest /var/www/html/tpetest
<Directory /var/www/html/tpetest/>
order deny,allow
deny from all
allow from 127.0.0.1
allow from 192.168.67.10
allow from 85.119.130.132
allow from 82.196.123.58
</Directory>
NameVirtualHost *:80
#NameVirtualHost *:443
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html/tpetest
ServerName tpetest.servehttp.com
ErrorLog logs/tpetest.se-error_log
CustomLog logs/tpetest.se-access_log common
</VirtualHost>
root@webserver html]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Sun Feb 01 21:01:27 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[ OK ]
[root@webserver html]#


Void Main wrote:Add this line to the top of your tperacing.conf file:
- Code: Select all
NameVirtualHost *:443



Users browsing this forum: No registered users and 0 guests