Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Nov 26, 2009 3:46 am 
Offline
Senior Newbie

Joined: Sun Nov 22, 2009 6:55 pm
Posts: 16
Hey all,

I have 1 IP on my Linode 360. I'm running Apache2 on Ubuntu 9.10 x86.

Long story short, I'm running about 5 VirtualHosts, and I'm specifying them using:


Code:
<VirtualHost *:80>


I also have this statement in my ports.conf file:

Code:
NameVirtualHost *:80



I've enabled Mod_Status and have set ExtendedStatus On. This is what my status.conf looks like:

Code:
<IfModule mod_status.c>
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Uncomment and change the ".example.com" to allow
# access from other hosts.
#
ExtendedStatus On
<Location /server-status>
  SetHandler server-status
  Allow from all
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
</Location>

</IfModule>



Now my issue is that when I browse to oneofmydomains.com/server-status, I get a 404 not found. I came across this post:http://systembash.com/content/apache-mod_status-404/. Basically I'm reading that I cannot designate VirtualHosts using *:80, AND have mod_status running, both on the same port.

If I add "Listen 8080" to my ports.conf, and I hit mydomain.com:8080/server-status, I DO receive the server-status page, which is obviously what I want. The *very small* downside, is that I must tack on the extra :8080 to view it.

Any thoughts on how to make this work with port 80 as well?

Have a great thanksgiving!

Thanks,
Ace


Top
   
 Post subject:
PostPosted: Thu Nov 26, 2009 3:46 am 
Offline
Senior Newbie

Joined: Sun Nov 22, 2009 6:55 pm
Posts: 16
Also:

I've decided to not designate my IP address for my VirtualHost configuration, simply because I want to have it as dynamic as possible.


Top
   
 Post subject:
PostPosted: Thu Nov 26, 2009 7:38 am 
Offline
Senior Member
User avatar

Joined: Sat Oct 16, 2004 11:13 am
Posts: 176
Quote:
Any thoughts on how to make this work with port 80 as well?

Enable proxy module,
Code:
a2enmod proxy

Then, add this to your Virtual Host directive:
Code:
 ProxyPass /status/ http://localhost:8080/server-status/
ProxyPassReverse /status/ http://localhost:8080/server-status/


Then, http://domain.com/status/ should work (don't forget the last slash - it's important!)


Top
   
PostPosted: Thu Nov 26, 2009 10:40 am 
Offline
Senior Member

Joined: Sun Aug 02, 2009 1:32 pm
Posts: 222
Website: https://www.barkerjr.net
Location: Connecticut, USA
Acejam wrote:
Basically I'm reading that I cannot designate VirtualHosts using *:80, AND have mod_status running, both on the same port.

That's incorrect. You just need to move the Location block into one of your VirtualHost blocks. For example:
Code:
<VirtualHost *:80>
  DocumentRoot /sync/www/example
  ServerName example.net

  <Location /server-status>
    SetHandler server-status
  </Location>
</VirtualHost>

Once you get it working, you should add some ACL to it, of course.


Top
   
PostPosted: Thu Nov 26, 2009 12:53 pm 
Offline
Senior Newbie

Joined: Sun Nov 22, 2009 6:55 pm
Posts: 16
BarkerJr wrote:
Acejam wrote:
Basically I'm reading that I cannot designate VirtualHosts using *:80, AND have mod_status running, both on the same port.

That's incorrect. You just need to move the Location block into one of your VirtualHost blocks. For example:
Code:
<VirtualHost *:80>
  DocumentRoot /sync/www/example
  ServerName example.net

  <Location /server-status>
    SetHandler server-status
  </Location>
</VirtualHost>

Once you get it working, you should add some ACL to it, of course.


I tried that before I posted actually, and it did not work. Just tried it again as well, with the same result:

Code:
<VirtualHost *:80>
ServerAdmin webmasterATmydomain.com
ServerName mydomain.com
ServerAlias *.mydomain.com
DocumentRoot /srv/www/acejam/html/
ErrorLog /srv/www/acejam/logs/error.log
CustomLog /srv/www/acejam/logs/access.log combined
<Directory "/srv/www/acejam/html">
allow from all
Options Indexes FollowSymLinks MultiViews
AllowOverride all
</Directory>

ProxyPass /webmin/ http://localhost:10000/
ProxyPassReverse /webmin/ http://localhost:10000/
<Proxy *>
allow from all
</Proxy>
<Location /server-status>
    SetHandler server-status
  </Location>

</VirtualHost>


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group