PHP Web Applications not accessible from the internet

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
User avatar
Stefano
Getting the hang of things
Posts: 56
Joined: Mon Sep 10, 2007 10:29 pm

PHP Web Applications not accessible from the internet

Post by Stefano »

Hi there!

I cannot access the web applications from the Internet on my TS-109 (1.1.1 0928). For example, when I try to run the phpMyAdmin using the address http://my.ip.here/phpMyAdmin, an error message comes back, saying the site http://192.168.178.2/phpMyAdmin cannot be retrieved (192.168.178.2 is the local IP address of my TS-109).

The access works from inside the LAN, but not from the internet. The strange thing is: I can access the web server's root by typing http://my.ip.here from outside! So the firewall cannot be the reason.

Same is for another application, WordPress at http://my.ip.here/wordpress. The phpinfo() on http://my.ip.here/phpinfo.php works. It shows the local IP address at several settings of Apache and the PHP variables, e.g. SERVER_NAME = 192.168.178.2. Do I have to change them? If yes, where?

Help,
Stefano

PS: I did not change the php.ini. It was restored by the admin interface. PHP is of version 5.2.0.
User avatar
AndyChuo
Experience counts
Posts: 2388
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan

Post by AndyChuo »

Hi stefano,

Yes I think phpinfo() got the SERVER_NAME info from apache.conf inside /share/HDA_DATA/apache/conf/apache.conf and this is the file you look for. Change the SERVER_NAME to your DNS name or external IP addr will eliminate the prob.

Andy
=============================================================>>>
TS-659-Pro [RAID6] rtorrent+SABnzbdplus+SickBeard+Couchpotato [Best PVR] Plex+PMS [Ultimate Streamer]
Apple iPad [Best Tablet] HTC One M8 [Mobile Phone] Samsung UA46ES6100 [My Screen] KRK Rokit 6 [Audio Speakers]
Chrome Cast [Screen Casting] Philips Hue [Personal Lighing]
Buffalo WZR-1750DHP [My Wifi Hub] D-Link DGS-1005D [Gbit Network]
=============================================================>>>
User avatar
Stefano
Getting the hang of things
Posts: 56
Joined: Mon Sep 10, 2007 10:29 pm

Post by Stefano »

Hi Andy,
QNAPAndy wrote:I think phpinfo() got the SERVER_NAME info from apache.conf inside /share/HDA_DATA/apache/conf/apache.conf and this is the file you look for.
This path doesn't exist. Do you mean /mnt/HDA_ROOT/apache/conf ?
QNAPAndy wrote:Change the SERVER_NAME to your DNS name or external IP addr will eliminate the prob.
There is no string SERVER_NAME inside this file.
:(

Stefano
User avatar
AndyChuo
Experience counts
Posts: 2388
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan

Post by AndyChuo »

Hi Stefano,

sorry abt my typo, here's the new file path:

/mnt/HDA_ROOT/apache/conf/apache.conf

and the string variable to edit:

ServerName your-domain-name
Last edited by AndyChuo on Mon Oct 08, 2007 8:41 pm, edited 1 time in total.
=============================================================>>>
TS-659-Pro [RAID6] rtorrent+SABnzbdplus+SickBeard+Couchpotato [Best PVR] Plex+PMS [Ultimate Streamer]
Apple iPad [Best Tablet] HTC One M8 [Mobile Phone] Samsung UA46ES6100 [My Screen] KRK Rokit 6 [Audio Speakers]
Chrome Cast [Screen Casting] Philips Hue [Personal Lighing]
Buffalo WZR-1750DHP [My Wifi Hub] D-Link DGS-1005D [Gbit Network]
=============================================================>>>
User avatar
Stefano
Getting the hang of things
Posts: 56
Joined: Mon Sep 10, 2007 10:29 pm

Post by Stefano »

Hi Andy,

That's the same path as in your first posting?! :roll:

Cheers,
Stefano
User avatar
AndyChuo
Experience counts
Posts: 2388
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan

Post by AndyChuo »

:lol: corrected it
=============================================================>>>
TS-659-Pro [RAID6] rtorrent+SABnzbdplus+SickBeard+Couchpotato [Best PVR] Plex+PMS [Ultimate Streamer]
Apple iPad [Best Tablet] HTC One M8 [Mobile Phone] Samsung UA46ES6100 [My Screen] KRK Rokit 6 [Audio Speakers]
Chrome Cast [Screen Casting] Philips Hue [Personal Lighing]
Buffalo WZR-1750DHP [My Wifi Hub] D-Link DGS-1005D [Gbit Network]
=============================================================>>>
User avatar
Stefano
Getting the hang of things
Posts: 56
Joined: Mon Sep 10, 2007 10:29 pm

Post by Stefano »

Doesn't work anyway, Andy.

I corrected the line

Code: Select all

#ServerName myNAS
to

Code: Select all

ServerName external.domain.name
and rebooted the TS-109. It still replaces the external domain name by the internal ip number, which can be found, when accessing from my network, but gives an error message, when accessing from the internet.

Stefano
lanfon
New here
Posts: 6
Joined: Tue Sep 04, 2007 8:39 am

Re: PHP Web Applications not accessible from the internet

Post by lanfon »

Stefano wrote:Hi there!

I cannot access the web applications from the Internet on my TS-109 (1.1.1 0928). For example, when I try to run the phpMyAdmin using the address http://my.ip.here/phpMyAdmin, an error message comes back, saying the site http://192.168.178.2/phpMyAdmin cannot be retrieved (192.168.178.2 is the local IP address of my TS-109).

The access works from inside the LAN, but not from the internet. The strange thing is: I can access the web server's root by typing http://my.ip.here from outside! So the firewall cannot be the reason.

Same is for another application, WordPress at http://my.ip.here/wordpress. The phpinfo() on http://my.ip.here/phpinfo.php works. It shows the local IP address at several settings of Apache and the PHP variables, e.g. SERVER_NAME = 192.168.178.2. Do I have to change them? If yes, where?

Help,
Stefano

PS: I did not change the php.ini. It was restored by the admin interface. PHP is of version 5.2.0.
Hello Stefano,
I meet the same problem, but you can try this way(add / at the end) to make it works. :wink:
http://my.ip.here/phpMyAdmin/
http://my.ip.here/wordpress/
User avatar
Stefano
Getting the hang of things
Posts: 56
Joined: Mon Sep 10, 2007 10:29 pm

Post by Stefano »

Hi lanfon,

Thanks for the slash hint. It works for phpMyAdmin, but it doesn't for WordPress.

Stefano
User avatar
AndyChuo
Experience counts
Posts: 2388
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan

Post by AndyChuo »

Hi Stefano,

At the admin backend of WordPress, under 'options' tab you can find these 2 settings:

WordPress address (URL):

and

Blog address (URL):

try adding a '/' after the url you set there.

Andy
=============================================================>>>
TS-659-Pro [RAID6] rtorrent+SABnzbdplus+SickBeard+Couchpotato [Best PVR] Plex+PMS [Ultimate Streamer]
Apple iPad [Best Tablet] HTC One M8 [Mobile Phone] Samsung UA46ES6100 [My Screen] KRK Rokit 6 [Audio Speakers]
Chrome Cast [Screen Casting] Philips Hue [Personal Lighing]
Buffalo WZR-1750DHP [My Wifi Hub] D-Link DGS-1005D [Gbit Network]
=============================================================>>>
User avatar
Stefano
Getting the hang of things
Posts: 56
Joined: Mon Sep 10, 2007 10:29 pm

Post by Stefano »

:arrow: Solved.

Many thanks. I didn't know, it's the WordPress/phpMyAdmin application configuration, that points to the local address.

Stefano
User avatar
AndyChuo
Experience counts
Posts: 2388
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan

Post by AndyChuo »

Good to hear that, no worries dude.

Keep digging there are lots of uses and apps based on php+mysql.
=============================================================>>>
TS-659-Pro [RAID6] rtorrent+SABnzbdplus+SickBeard+Couchpotato [Best PVR] Plex+PMS [Ultimate Streamer]
Apple iPad [Best Tablet] HTC One M8 [Mobile Phone] Samsung UA46ES6100 [My Screen] KRK Rokit 6 [Audio Speakers]
Chrome Cast [Screen Casting] Philips Hue [Personal Lighing]
Buffalo WZR-1750DHP [My Wifi Hub] D-Link DGS-1005D [Gbit Network]
=============================================================>>>
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”