multiple WEB sites

Problems with the Windows version of XAMPP, questions, comments, and anything related.

multiple WEB sites

Postby asamol » 01. August 2008 17:46

Dear Group,
We would like to host multiple WEB sites [3] on a single server is this possible using the XAMPP install?
Please advise,
Alex
asamol
 
Posts: 2
Joined: 01. August 2008 16:02

Postby finity » 10. August 2008 12:38

You can host any number of web sites using the vhosts functionality of the apache web server. Is not something you have built in XAMPP control panel. You have to edit this file: xampp\apache\conf\extra\httpd-vhosts.conf

You should have a look at the apache documentation to see exactly how to use this option. In the latest version of appache I think you can keep all vhosts in a mysql database if I understood correctly ... very nice feature.
finity
 
Posts: 2
Joined: 10. August 2008 12:32

multiple websites on 1 server

Postby ukprotect » 10. August 2008 20:53

1. configure httpd.conf. Add the following:

<Directory "D:/Folder location of site 1">
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<Directory "D:/Folder location of site 2">
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

2. Save the file.

3. Go to extra/httpd-vhosts.conf Edit it as follows:

NameVirtualHost localIPAddress:80


#NameVirtualHost www.domain1.com:80
<VirtualHost localIPAddress:80>
ServerAdmin admin@domain1.com
DocumentRoot "D:/folder location to domain 1"
ServerName domain1.com
ServerAlias www.domain1.com
ErrorLog logs/domain1.com-error_log
CustomLog logs/domain1.com-access_log common
</VirtualHost>



#NameVirtualHost www.domain1.com:80
<VirtualHost localIPAddress:80>
ServerAdmin admin@domain2.com
DocumentRoot "D:/Folder location to domain2"
ServerName domain2.com
ServerAlias www.domain2.com
ErrorLog logs/domain2.com-error_log
CustomLog logs/domain2.com-access_log common
</VirtualHost>

4. Save changes.
5. Restart Apache service

Enjoy.
Thinking is the hardest thing there is, which is the probable reason why so few engage in it.
ukprotect
 
Posts: 11
Joined: 10. August 2008 18:28

multiple websites with apache and IIS

Postby crazydrve » 12. August 2008 05:44

hi people need some help here.

i am only trying this as a test, i can do it if needed. etc.

i am running windows 2003 with a website on IIS
i am also running xampp

i am trying to run both separate sites.
i have given each site different ip address

IIS = 192.168.0.5
Apache = 192.168.0.15

now i am sure this can be done with dns but have not bought a domain yet.
i plan on it later.

i have the sites running individually and i can access them inside my network.

what i would like to do (without dns) is access both sites outside my network like if friends were wanting to access it .

example
iis site would be for selling stuff etc.

apache would be personal forums notes etc.


any suggestions would be appreciated.

thanks
crazydrve
crazydrve
 
Posts: 3
Joined: 07. August 2008 06:20

Thank you

Postby asamol » 13. August 2008 02:29

I will look into the conf file as you suggested.
Thank you for the info...
Alex
asamol
 
Posts: 2
Joined: 01. August 2008 16:02

multiple websites with apache and IIS

Postby ukprotect » 18. August 2008 08:48

If you have been allocated more than 1 IP address by your ISP then you can use different external IP addresses for each webserver.
If you have only 1 externel IP address then the best bet would be to run them both on the same internal IP but on different ports. eg.

webserver IIS - 192.168.0.5:80
forum on xampp - 192.168.0.5:8080

You then need to do port forwarding on your external router.
Thinking is the hardest thing there is, which is the probable reason why so few engage in it.
ukprotect
 
Posts: 11
Joined: 10. August 2008 18:28

Postby mnem0 » 14. September 2008 10:18

let's say i have domain.net on my server, if i want to create a vhost called "vhost", would this work ?



#httpd-vhosts.conf
#NameVirtualHost www.domain.net:80
<VirtualHost 127.0.0.1:80>
ServerAdmin admin@domain.net
DocumentRoot "C:/Program Files/xampp/htdocs/"
ServerName domain.net
ServerAlias www.domain.net
ErrorLog logs/domain.net-error_log
CustomLog logs/domain.net-access_log common
</VirtualHost>



#NameVirtualHost vhost.domain.net:80
<VirtualHost 127.0.0.1:80>
ServerAdmin admin@domain.net
DocumentRoot "C:/Program Files/xampp/htdocs/wordpress/"
ServerName vhost.domain.net
ServerAlias vhost.domain.net
ErrorLog logs/domain.net-error_log
CustomLog logs/domain.net-access_log common
</VirtualHost>

#end sample httpd-vhosts.conf



#sample httpd.conf
<Directory "C:\Program Files\xampp\htdocs\wordpress">
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

thanks for helping me :)
mnem0
 
Posts: 12
Joined: 16. May 2008 19:32


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 134 guests