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 02-13-2013, 09:21 PM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
ubuntu http directing all traffic to default site (nagios)


A little puzzled, as I've done this enough times, but this box is running ubuntu 12.04LTS and is my primary nagios server.

I need to run a few rather static sites on the same box (no problem with power on this), so I added a new virual site, added my info restarted, but all traffic is going from;

www.newsite.com getting a 301 over to nagios.domain.com/nagios with the working nagios info.

/etc/apache2/conf.d has a nagios.conf with a few rewrite rules, but the thing I noticed, it's only on php files. If I goto www.newsite.com/test.html I get my test page (in that vhost), yet if I goto www.newsite.com/index.php, I get the 301 and moved to nagios.

What simple thing am I overlooking! Tnx all
 
Old 02-14-2013, 01:11 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, php certainly isn't 'static' so its your choice... either enable dynamic/cgi and php or create an index.html instead.
 
1 members found this post helpful.
Old 02-14-2013, 08:14 AM   #3
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Original Poster
Rep: Reputation: 31
Sorry Chris a bit confused. I know PHP is not static, some of the site uses some form stuff that was done in php, so an index.html is not a solution.

As for enable dynamic/cgi, not sure I am following. From my history of virual hosts, if apache sees a match with the servername/alias, it stay's in that vhost. The fact that an .html displays in the right location yet PHP doesn't leads me to believe it would be something in the apache2/php.ini file since nothing in the 000-default has anything php related, but I see nothing. Going to google around now that I have some coffee started.

Thanks,
 
Old 02-14-2013, 08:30 AM   #4
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Original Poster
Rep: Reputation: 31
NM Chris, ended up getting it to work. Tried something as basic as removing php5 and then re-installing. Restarted apache and things fell into place nicely!

Thanks again.
 
  


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
nagios not working (http://localhost/nagios or http://ip/nagios) 404 error connect2janu Linux - Server 1 11-18-2012 02:06 AM
Is this possible ?? - IP traffic re-directing mykstar Linux - Networking 2 10-02-2012 11:21 AM
Port forwarding: Directing traffic to a ssh client JustinKubicek Linux - Newbie 5 05-31-2009 12:00 PM
directing HTTP traffic to local intranet kennmurrah Linux - Networking 6 01-27-2007 11:44 AM
Directing Traffic on 2 LAN Cards Xing Linux - Networking 2 08-17-2005 02:59 AM

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

All times are GMT -5. The time now is 12:02 AM.

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