Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-25-2011, 02:18 AM
|
#1
|
LQ Newbie
Registered: Mar 2009
Posts: 7
Rep:
|
Apache port redirection? Vhosts
Hi all,
I'm running a server with Ubuntu 10.04 installed. I recently set up a VirtualHost (I'll call it my.website.com), like I have in the past without any problems. But this time, I'm stumped. When I connect to my.website.com, it should hit port 80, right? It doesn't; rather, it hits port 8000. I don't have any rewrites/redirections (I checked wherever possible) and checked apache2.conf (httpd.conf is empty). Below are the Vhosts (the third Vhost is the one I set up):
Code:
NameVirtualHost 210.220.230.240:80
NameVirtualHost 210.220.230.241:80
<VirtualHost 210.220.230.240:80>
ServerName log.website.com
ServerAlias log.website.com
DocumentRoot /home/website/public_html/logs
ServerAdmin webmaster@website.com
UseCanonicalName Off
# DocumentRoot /home/website/public_html/logs
# Directory /home/website/public_html/logs
# AuthDBMUserFile /home/website/passwd
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/website/public_html/logs>
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
allow from all
AuthName "Private"
AuthType Basic
AuthBasicProvider dbm
AuthDBMUserFile /home/website/passwd
Require valid-user
</Directory>
ScriptAlias /cgi-bin/ /home/website/public_html/cgi-bin/
<Directory "/home/website/public_html/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/website/logs/website_error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /home/website/logs/website_access.log combined
CustomLog /home/website/logs/website.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
ServerSignature On
</VirtualHost>
<VirtualHost 210.220.230.241:80>
ServerName log.website2.com
ServerAlias log.website2.com
DocumentRoot /home/website2/public_html/logs/
ServerAdmin webmaster@website.com
UseCanonicalName Off
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/website2/public_html/logs>
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
allow from all
AuthName "Private"
AuthType Basic
AuthBasicProvider dbm
AuthDBMUserFile /home/website2/passwd
Require valid-user
</Directory>
ScriptAlias /cgi-bin/ /home/website2/public_html/cgi-bin/
<Directory "/home/website2/public_html/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/website2/logs/website2_error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /home/website2/logs/website2_access.log combined
CustomLog /home/website2/logs/website2.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
ServerSignature On
</VirtualHost>
<VirtualHost 210.220.230.240:80>
ServerName my.website.com
ServerAlias my.website.com
DocumentRoot /home/website/user
ServerAdmin webmaster@website.com
UseCanonicalName Off
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/website/user>
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
allow from all
AuthName "Private"
AuthType Basic
AuthBasicProvider dbm
AuthDBMUserFile /home/website/botpasswd
Require valid-user
</Directory>
<Directory "/home/support/public_html/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/support/logs/support_error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /home/support/logs/support_access.log combined
CustomLog /home/support/logs/support.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
ServerSignature On
</VirtualHost>
Oh yeah, ports.conf doesn't have a listen on 8000, in case you are wondering.
It surely seems like a redirection, and if it is, what's causing it?
Thanks in advance for your help!
Last edited by JimmyTaylor; 03-25-2011 at 02:20 AM.
|
|
|
03-25-2011, 04:56 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
if it's a redirection you'll see a 302 response. Easiset way to be sure is to curl -v the domain name, as that will just dump the first response, so if you are being redirected you'll see it there.
|
|
|
03-25-2011, 01:21 PM
|
#3
|
LQ Newbie
Registered: Mar 2009
Posts: 7
Original Poster
Rep:
|
Quote:
Originally Posted by acid_kewpie
if it's a redirection you'll see a 302 response. Easiset way to be sure is to curl -v the domain name, as that will just dump the first response, so if you are being redirected you'll see it there.
|
Thanks for the response, acid_kewpie.
I did what you said and it does connect to port 80. But when I pop the domain into the browser, it tries to connect to 8000. Any other suggestions?
Thanks again!
|
|
|
03-25-2011, 01:26 PM
|
#4
|
LQ Newbie
Registered: Mar 2009
Posts: 7
Original Poster
Rep:
|
By Jove, it hit me right after I typed my post above.
I decided to blame Firefox for it, and tried IE and Safari. Guess what? It worked!
I need to find out why Firefox is messing up. Also, I need to start verifying things like this on multiple browsers. :P
Thanks again!
|
|
|
03-25-2011, 01:39 PM
|
#5
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,217
|
Hi,
Comment out "UseCanonicalName Off" so apache uses the default (that is "On") and clear firefox cache.
Regards
|
|
|
03-25-2011, 02:58 PM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Quote:
Originally Posted by JimmyTaylor
Thanks for the response, acid_kewpie.
I did what you said and it does connect to port 80. But when I pop the domain into the browser, it tries to connect to 8000. Any other suggestions?
Thanks again!
|
It will always connect to port 80, it's impossible not to without specifying otherwise. The issue is, what came back?
|
|
|
All times are GMT -5. The time now is 02:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|