Help in configuring apache virtual hosts

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

Help in configuring apache virtual hosts

Postby leszczu » 22. July 2008 11:01

Hi, I got problem configuring my virtual hosts (name & port based). I would appreciate any help.
I want to host two servers on one computer:
public (i want it to accessible on port 80)
development (on port 8001)
I have dynamic IP address, so I want users to type eg:
Code: Select all
123.123.123.123 (public)
or
123.123.123.123:8001 (development)

to get to those servers.
In the same time, I want those servers to be accessible to me as:
Code: Select all
localhost
and
development

by just typing that name into browser, without any ip, port or anything. As I understand it, I have to create two virtual hosts and modify /etc/hosts but, unfortunately, I can't get it to work.

Here's my /etc/hosts:
Code: Select all
127.0.0.1   localhost
127.0.0.1:8001 development


My /etc/apache2/ports.conf:
Code: Select all
Listen 80
Listen 8001


My /etc/apache2/sites-enabled/ files:
Code: Select all
ServerName localhost
DocumentRoot /www/localhost/


Code: Select all
NameVirtualHost *:8001
<VirtualHost *:8001 development>
   ServerName development
   ServerAlias 127.0.0.1:8001
   DocumentRoot /www/development/
</VirtualHost>


Right now, remote access to my server (through IP & port) works, but my local access to development server won't. How to fix that?
leszczu
 
Posts: 1
Joined: 22. July 2008 10:44

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 107 guests