Apache Vitual Host Question

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

Apache Vitual Host Question

Postby Michaelr » 19. November 2005 00:08

Hi,

I tried to setup 2 sites using my server (home based) and am having some problems. I will try and explain as best I can.

I edited the httpd config file like the instructions said, but I keep getting a document root error (does not exist).

I have Xammp installed and am running Joomla.

I installed one joomla site into the root of htdocs, the second I installed in /htdocs/invaded

I am also using No-Ip to handle my dynamic IP.

What should my document root be? Here is the actual location:
C:\Program Files\xampp\htdocs

Here is the second installed location:
C:\Program Files\xampp\htdocs\invaded

My second question is since I am using no-ip my web address isn't http://www.example.hopto.org... it is http://example.hopto.org

Does this make a difference?

Thanks in advance for your help :)
Michaelr
 
Posts: 6
Joined: 04. November 2005 14:48
Location: Canada

vhost with plone

Postby rroslan » 25. November 2005 04:05

I tried this with the default xampp installation and plone running on port 8080, it work. for your problem I think you have to add Server DocumentRoot after ServerAlias. Tell me how you do.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80 _default_>
ServerName ireti.com
ServerAlias www.ireti.com
DocumentRoot c:\web\xampp\htdocs
ServerAdmin rroslan@gmail.com
</VirtualHost>

<VirtualHost *:80>
ServerName rmsb.ireti.com
ServerAlias *.rmsb.ireti.com
ServerAdmin rroslan@gmail.com
RewriteEngine on
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/rmsb/VirtualHostRoot/$1 [L,P]

</VirtualHost>

<VirtualHost *:80>
ServerName marine.ireti.com
ServerAlias *.marine.ireti.com
ServerAdmin rroslan@gmail.com
RewriteEngine on
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/test/VirtualHostRoot/$1 [L,P]

</VirtualHost>
<VirtualHost *:80>
ServerName edu.ireti.com
ServerAlias *.edu.ireti.com
ServerAdmin rroslan@gmail.com
RewriteEngine on
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/edu/VirtualHostRoot/$1 [L,P]

</VirtualHost>
<VirtualHost *:80>
ServerName blog.ireti.com
ServerAlias *.blog.ireti.com
ServerAdmin rroslan@gmail.com
RewriteEngine on
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/blog/VirtualHostRoot/$1 [L,P]

</VirtualHost>
rroslan
 
Posts: 5
Joined: 25. November 2005 02:03
Location: Cukai, Malaysia


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 45 guests