Webserver redirected to Admin Page

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Webserver redirected to Admin Page

Post by schumaku »

LittleNo wrote:With this information it should be clear that the QNAP is redirecting the browsers https-traffic.
Not to me. Much more it does add another variable named ownCloud. Why not provide ALL information from the beginning? Check all the possible ownCloud redirect controls in the folder, like .htacess an the like.
LittleNo
Starting out
Posts: 12
Joined: Sat Dec 24, 2011 10:09 pm

Re: Webserver redirected to Admin Page

Post by LittleNo »

when I access ownCloud directly from the local network (like https://nasname/owncloud) nothing is beeing redirected. Also, why should ownCloud have anything in it's controls to redirect someone to the QNAP Admin page?
LittleNo
Starting out
Posts: 12
Joined: Sat Dec 24, 2011 10:09 pm

Re: Webserver redirected to Admin Page

Post by LittleNo »

I temporarily switched over to standard http over port 80, with that the virtual server works fine. So it's just a problem when using https
BertvanderH
New here
Posts: 5
Joined: Sun Oct 18, 2009 5:31 pm

Re: Webserver redirected to Admin Page

Post by BertvanderH »

I got a nice suggestion from Ronald (dutch Qnap support):

1) Change the port in the virtual server to (example given) 808
2) Change the forwarding port in your router into the same port: external port 80, internal port 808

That did the job
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Webserver redirected to Admin Page

Post by schumaku »

BertvanderH wrote:I got a nice suggestion from Ronald (dutch Qnap support):
Cheap workaround - not fixing anything. And causing issues with complex server side generate Web pages ... the Web Server and the application does create links to 808 ... because it does not now about the NAT+PAT at all.

I'm 100% convinced that a properly configured NAS with the Web Server enabled and working, and this f***ng index.php removed does _not_ redirect anything.
latomus
First post
Posts: 1
Joined: Sun Oct 20, 2013 4:09 am

Re: Webserver redirected to Admin Page

Post by latomus »

Hello,

I had the same problem and here follows some explanations as to how I solved it:

In the website root, there was a file named index.php and containing a php script reading like:

<?php
$webAccessPort = exec('/sbin/getcfg System "Web Access Port" -d 8080');
$webAccessUrl = 'http://'.$_SERVER['SERVER_NAME'].':'.$webAccessPort.'/';
?>

I do not know anything about PHP, but since it looked like a redrection, Therefore, I replaced the entire content of this file named index.php with something like <?phpinfo()?> and it no longer redirects to the QNAP Administration page.

My settings are :
system port : 86
webserver port : 80

As a consequence, when I put the IP address corresponding that NAS in my LAN, I am no longer redirected to QNAP Administration page. I have to explicitly mention the port (ie. http://IPAddress:86)

Regards

Pierre
piotros
New here
Posts: 3
Joined: Fri May 21, 2021 12:02 am

Re: Webserver redirected to Admin Page

Post by piotros »

latomus wrote: Sun Mar 12, 2017 7:58 pm As a consequence, when I put the IP address corresponding that NAS in my LAN, I am no longer redirected to QNAP Administration page. I have to explicitly mention the port (ie. http://IPAddress:86)
After last ransomware attacks I have to admit that it should work this way by default.

Thanks @latomus for your solution.
User avatar
dolbyman
Guru
Posts: 34903
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Webserver redirected to Admin Page

Post by dolbyman »

no need to dig this up just for a necropost

marked for closure
User avatar
OneCD
Guru
Posts: 12010
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Webserver redirected to Admin Page

Post by OneCD »

* topic locked to prevent further necroposting *

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Locked

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