Access /Web/..-Folder over the WWW

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
MaarBCH
Starting out
Posts: 18
Joined: Tue Feb 11, 2014 6:15 am

Re: Access /Web/..-Folder over the WWW

Post by MaarBCH »

i did. but no changes yet.

what i did

2.) deleted the file.

1. deleted the file. turned Web server off. and restarted it again, it created the file again, and no changes.

2.) deleted the file. restarted the NAS, file has been recreated, no changes

<?php
function isMyCloudNAS()
{
if (isset($_SERVER['HTTP_HOST']) && strlen($_SERVER['HTTP_HOST']) > 0)
$_http_host = $_SERVER['HTTP_HOST'];
else
return false;
$mycloudnas_domains = Array(
'mycloudnas.com',
'myqnapnas.com',
'qcloudnas.com',
'myqnapcloud.com'
);
foreach ($mycloudnas_domains as $d)
{
if (strncasecmp(stristr($_http_host,$d),$d,strlen($d))==0)
{
return true;
}
}
return false;
}
if(isMyCloudNAS() == true){
$extPort = exec('/sbin/getcfg System ExtPort -d 0');
if(intval($extPort)>0)
$webAccessPort = $extPort;
else
$webAccessPort = exec('/sbin/getcfg System "Web Access Port" -d 8080');
}
else
$webAccessPort = exec('/sbin/getcfg System "Web Access Port" -d 8080');
$webAccessUrl = 'http://'.$_SERVER['SERVER_NAME'].':'.$webAccessPort.'/';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="expires" content="0">
<script type='text/javascript'>
location.href = '<?=$webAccessUrl?>';
</script>
</head>
</html>
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: Access /Web/..-Folder over the WWW

Post by pwilson »

MaarBCH wrote:i did. but no changes yet.

what i did

2.) deleted the file.

1. deleted the file. turned Web server off. and restarted it again, it created the file again, and no changes.

2.) deleted the file. restarted the NAS, file has been recreated, no changes

<?php
function isMyCloudNAS()
{
if (isset($_SERVER['HTTP_HOST']) && strlen($_SERVER['HTTP_HOST']) > 0)
$_http_host = $_SERVER['HTTP_HOST'];
else
return false;
$mycloudnas_domains = Array(
'mycloudnas.com',
'myqnapnas.com',
'qcloudnas.com',
'myqnapcloud.com'
);
foreach ($mycloudnas_domains as $d)
{
if (strncasecmp(stristr($_http_host,$d),$d,strlen($d))==0)
{
return true;
}
}
return false;
}
if(isMyCloudNAS() == true){
$extPort = exec('/sbin/getcfg System ExtPort -d 0');
if(intval($extPort)>0)
$webAccessPort = $extPort;
else
$webAccessPort = exec('/sbin/getcfg System "Web Access Port" -d 8080');
}
else
$webAccessPort = exec('/sbin/getcfg System "Web Access Port" -d 8080');
$webAccessUrl = 'http://'.$_SERVER['SERVER_NAME'].':'.$webAccessPort.'/';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="expires" content="0">
<script type='text/javascript'>
location.href = '<?=$webAccessUrl?>';
</script>
</head>
</html>
Yes it does. Create your own version, and it will stop doing this.

I use the following: /share/Web/index.php file here:

/share/Web/index.php

Code: Select all

<?php
echo "<img src=\"http://i40.tinypic.com/avqurc.gif\" border=0>";
?>

Check my earlier posts within this same thread.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
MaarBCH
Starting out
Posts: 18
Joined: Tue Feb 11, 2014 6:15 am

Re: Access /Web/..-Folder over the WWW

Post by MaarBCH »

i made a file as you said.

i even rebooted the nas.

no changes.

the file has 755 permission setting.
MaarBCH
Starting out
Posts: 18
Joined: Tue Feb 11, 2014 6:15 am

Re: Access /Web/..-Folder over the WWW

Post by MaarBCH »

hmm i/we found the problem...all was working on google chrome, but not on safari...after deleting the "web history" in safari it stared working too.
Post Reply

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