LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-19-2009, 04:23 AM   #1
rajaoLQ
LQ Newbie
 
Registered: Aug 2009
Location: Chennai, India
Distribution: Ubuntu
Posts: 4

Rep: Reputation: 0
Localhost pointing to default page if I don't specify the port number in the address


I am trying to setup the "Trac" tool in a standalone fashion using apache2.
I have done many of the changes suggested in various forums, but still unlucky.

Here is my problem:
I have setup a localhost in /etc/apache2/sites-enabled (and ofcourse sites-available) as www.oms.domain.com
if I type "http://www.oms.domain.com", then the default "It Works !!!" page is opening. but if I specify the port also, like "http://www.oms.domain.com:8080", then the intended server page is opening.

Any method to get rid of this, as its quite annoying and I dont want the user to know the port in which it is running, though it really doesn't matter.

Sorry if it is answered some thread already, but I couldn't locate though.
 
Old 08-19-2009, 05:15 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rajaoLQ View Post
I am trying to setup the "Trac" tool in a standalone fashion using apache2.
I have done many of the changes suggested in various forums, but still unlucky.

Here is my problem:
I have setup a localhost in /etc/apache2/sites-enabled (and ofcourse sites-available) as www.oms.domain.com
if I type "http://www.oms.domain.com", then the default "It Works !!!" page is opening. but if I specify the port also, like "http://www.oms.domain.com:8080", then the intended server page is opening.

Any method to get rid of this, as its quite annoying and I dont want the user to know the port in which it is running, though it really doesn't matter.

Sorry if it is answered some thread already, but I couldn't locate though.
i *think* i understand what you are saying.....so.....
post relevant section of your apache config.
you could also of course use iptables for forwarding to the given port.
 
Old 08-19-2009, 07:00 AM   #3
rajaoLQ
LQ Newbie
 
Registered: Aug 2009
Location: Chennai, India
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
(only the portions which I felt might be of use. incase you need anymore, let me know)

Here is my apache2.conf
===============================================================

# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"

.
.
.
.

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off


# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf

# Include generic snippets of statements
Include /etc/apache2/conf.d/
Include /etc/apache2/conf.d/*.conf

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

# This following section is for Authentication to TRAC tool
<Location "/trac/login">
AuthType Basic
AuthName "Trac"
AuthUserFile /etc/apache2/trac.htpasswd
Require valid-user
</Location>

# This following section is for Authentication to SVN
<Location /usr/lib/svn>
DAV svn
SVNPath /var/lib/svn/svnrepos/
AuthType Basic
AuthName "SVN Repository"
AuthUserFile /etc/apache2/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
===============================================================

Here is my trac.conf
===============================================================
<VirtualHost *:80>
#ServerName http://www.oms.domainname.com/
ServerName localhost
ServerAdmin admin@tracserver
ServerAlias oms.domainname.com

#SSLEngine On
#SSLCertificateFile /etc/apache2/ssl/apache.pem

DirectoryIndex index.html
DocumentRoot /usr/lib/python2.6/dist-packages/trac/templates
#<Directory />
# Options None
# AllowOverride None
# allow from all
#</Directory>

# Trac settings
<Directory "/var/lib/trac">
Options +FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>

<Directory "/var/lib/trac/projects">
AllowOverride all
Options ExecCGI -MultiViews +FollowSymLinks
AddHandler cgi-script .cgi
Order allow,deny
Allow from all
</Directory>


ErrorLog /var/log/apache2/trac_error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/trac_access.log combined
ServerSignature On
</VirtualHost>
===============================================================
 
Old 08-20-2009, 04:01 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rajaoLQ View Post
(only the portions which I felt might be of use. incase you need anymore, let me know)

Here is my apache2.conf
===============================================================

# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"

.
.
.
.

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off


# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf

# Include generic snippets of statements
Include /etc/apache2/conf.d/
Include /etc/apache2/conf.d/*.conf

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

# This following section is for Authentication to TRAC tool
<Location "/trac/login">
AuthType Basic
AuthName "Trac"
AuthUserFile /etc/apache2/trac.htpasswd
Require valid-user
</Location>

# This following section is for Authentication to SVN
<Location /usr/lib/svn>
DAV svn
SVNPath /var/lib/svn/svnrepos/
AuthType Basic
AuthName "SVN Repository"
AuthUserFile /etc/apache2/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
===============================================================

Here is my trac.conf
===============================================================
<VirtualHost *:80>
#ServerName http://www.oms.domainname.com/
ServerName localhost
ServerAdmin admin@tracserver
ServerAlias oms.domainname.com

#SSLEngine On
#SSLCertificateFile /etc/apache2/ssl/apache.pem

DirectoryIndex index.html
DocumentRoot /usr/lib/python2.6/dist-packages/trac/templates
#<Directory />
# Options None
# AllowOverride None
# allow from all
#</Directory>

# Trac settings
<Directory "/var/lib/trac">
Options +FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>

<Directory "/var/lib/trac/projects">
AllowOverride all
Options ExecCGI -MultiViews +FollowSymLinks
AddHandler cgi-script .cgi
Order allow,deny
Allow from all
</Directory>


ErrorLog /var/log/apache2/trac_error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/trac_access.log combined
ServerSignature On
</VirtualHost>
===============================================================
hang on...why are you typing port 8080??
what is listening on that port and where?
 
Old 08-24-2009, 12:33 AM   #5
rajaoLQ
LQ Newbie
 
Registered: Aug 2009
Location: Chennai, India
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
my Trac tool is running on port 8080 as a stand-alone.
Command: "tracd --port 8080 /path/to/MyEnv"
 
Old 08-24-2009, 12:39 AM   #6
rajaoLQ
LQ Newbie
 
Registered: Aug 2009
Location: Chennai, India
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by centosboy View Post
you could also of course use iptables for forwarding to the given port.
By the way, how do I do port forwarding using iptables?
 
Old 08-24-2009, 02:52 PM   #7
s-tanner
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Rep: Reputation: 3
tracd is a standalone web server for the trac application. Its so you don't have to go through the trouble of setting up a full web server (like apache) to access it.


You have several options:

1. Don't run apache and change the tracd port to 80 (tracd --port 80 /path/to/MyEnv"). Then tracd will be listening on the default port and answering requests on this server.

2. Configure apache to proxy requests to tracd. Then you could setup http://www.oms.domain.com or http://www.oms.domain.com/trac to send requests to tracd listening on 8080.

3. Use apache + the standard Trac CGI's instead of tracd.
 
  


Reply



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
Dolphin pointing to wrong folders by default chaostheory07 Mandriva 3 03-03-2009 07:54 AM
how to find out the ip address and port number of an incoming message? meghadj Linux - Networking 1 09-25-2008 05:20 AM
localhost ip number jamaas Linux - Networking 1 09-10-2004 09:39 AM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 12:35 PM
pointing browser to localhost??? asiatrek Linux - Networking 2 05-22-2002 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:12 PM.

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