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 (public)
or (development)

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

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   localhost 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
   DocumentRoot /www/development/

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

Return to XAMPP for Linux

Who is online

Users browsing this forum: milind1983 and 34 guests