LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-30-2009, 03:20 PM   #1
koiril
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Rep: Reputation: 0
Apache redirecting problem


Hey All,

I'm having some troubles getting an application called "Gallery 2" working on my linux server. It's working for my internal network but not if I try to connect from a computer outside the network. My server is behind a regular dlink router. When I do try to connect to it from an outside computer it resolves my IP address properly but then gets automatically redirected to the internal IP address of my server. Any chance someone knows a fix for this? I'm not sure what all information you would need to diagnose this problem so I'll try to include some info I think you'd need. Let me know if anything else is needed:

I have:
-PHP5
-Apache2
-MySQL

Code:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 9.04
Release:        9.04
Codename:       jaunty
 
Old 07-01-2009, 09:50 AM   #2
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
If your able to reach the webpage internally then the issues most likely are with your routers setup. You will need to make sure you have a port-forward or port-trigger setup on the router. What model do you have? Typically you can do a port forward quite easily. You may also want to setup dyndns in the router as well so you can have a hostname to connect to instead of trying to figure out what your home IP address is. The port you will need to forward will probably be port 80.
 
Old 07-01-2009, 11:29 PM   #3
koiril
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply! I have setup port forwarding and know it's working. The reason I know it's working is because when I try to connect to my dynamic ip hostname, which is my routers external ip, the computer resolves the IP properly but then the router or my server redirects the web page to my internal IP address.
 
Old 07-10-2009, 02:40 PM   #4
blankreality
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
I had this exact same problem and didn't find any answers online. Good news is that the fix is simple. The issue is not with your server or router config, but with your Gallery2 config.

In your Gallery2 root folder, locate the config.php file and open in in a text editor. Towards the end of the file, you will find a line something like

Code:
$gallery->setConfig('baseUri', 'protocol://192.168.blah.blah/Gallery2/main.php');
This line seems to be automatically written with the most recent installers for Gallery2 and is overriding the Gallery's autodetection features.

Fix: Just delete that line.

It should work just fine after that.

Cheers,
-blankreality
 
Old 07-13-2009, 10:09 AM   #5
koiril
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks! That did the trick
 
  


Reply

Tags
apache, redirect



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
Apache: Redirecting to Different Port zok Linux - Networking 1 07-17-2007 11:51 AM
apache server redirecting to apache.org? exley Linux - Software 1 03-13-2006 01:02 AM
Problem Redirecting in Apache kaplan71 Linux - Software 0 09-09-2004 02:52 PM
Apache redirecting to IP address di11rod Linux - Software 6 06-03-2004 06:18 PM
apache redirecting mardanian Linux - Networking 1 04-14-2004 06:17 AM

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

All times are GMT -5. The time now is 05: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