Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-12-2015, 02:29 AM   #1
byran cheung
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
Apache configuration

I use Apache server .

I have two different DocumentRoot and would like to setup two virtualhost , so that two different port can serve different DocumentRoot , I use the below URL but do not work , when I use this method , even I use connect 80 or 8080 , it also re-direct to port 80 , would advise if I use the wrong method ? very thanks

Server configuration

 Listen 80
 Listen 8080


 DocumentRoot /www/domain-80

 DocumentRoot /www/domain-8080

 DocumentRoot /www/otherdomain-80

 DocumentRoot /www/otherdomain-8080

Last edited by byran cheung; 02-12-2015 at 02:31 AM.
Old 02-12-2015, 10:28 AM   #2
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
The ServerName for both 80 and 8080 in the first example is the same. It matches on the first one searched, which is 80.
Try naming the 8080 Servernames something unique as in the Apache doc's :

ServerName for 80, ServerName for 8080.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to Add mod_evasive configuration to Apache configuration file.? Unknown3r Linux - Newbie 1 11-04-2012 10:09 AM
Apache 2.0 configuration mulayanup Linux - Server 2 08-16-2010 03:25 AM
Migrating Apache 1.3 configuration files to Apache 2 kaplan71 Linux - Software 0 03-28-2007 11:05 AM
Apache Configuration chimp Linux - Newbie 3 12-14-2004 05:24 PM
apache configuration hardigunawan Linux - Newbie 1 06-21-2002 08:07 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration