index.php running on website if Apple device used
Posted by: Dingus (---.20-3.cable.virginm.net)
Date: November 04, 2021 10:04PM

Hi folks.
I've downloaded the lates WAMP
I used WAMP to generate the new sites.

My issue is one of my sites stops at www and runs index.php, it doesn't goto the website root.
This only happens on iPhones or iPads. Seriously. I know how crazy it sounds, but I've checked muliple devices.
I have 2 sites. 1 works fine but 1 does as described.


my vhost file:

# Virtual hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


#
<VirtualHost *:80>
ServerName photos
DocumentRoot "d:/wamp64/www/photos"
<Directory "d:/wamp64/www/photos/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


#
<VirtualHost *:80>
ServerName scotlodge
DocumentRoot "d:/wamp64/www/scotlodge"
<Directory "d:/wamp64/www/scotlodge/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

and my host file:

#
127.0.0.1 localhost
::1 localhost

127.0.0.1 photos
::1 photos

127.0.0.1 scotlodge
::1 scotlodge

All of it was generated by WAMP.

Re: index.php running on website if Apple device used
Posted by: Otomatic (Moderator)
Date: November 05, 2021 10:05AM

Hi,

> one of my sites stops at www and runs index.php, it doesn't goto the website root.
In the httpd.conf file, there is the directive:
DirectoryIndex index.php index.php3 index.html index.htm
It is therefore quite normal that if an index.php file exists, it is executed if no other file is present in the url.
'http://mysite/' runs index.php
'http://mysite/myfile.php' runs myfile.php

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: index.php running on website if Apple device used
Posted by: Dingus (---.20-3.cable.virginm.net)
Date: November 05, 2021 10:46PM

Thanks Otomatic for helping.
In my website directories I use index.html to run my sites.
The index.php is in WAMP's www folder not in my website folders.
I've removed the index.php from www folder to see if this helps.

Now I can access my websites but only using http and not https.
With https I get as far as www, which leads me to think WAMP is stopping access.

I get:
Forbidden

You don't have permission to access this resource.

The Apple side of things resolved itself over night. Weird.



Edited 3 time(s). Last edit at 11/05/2021 11:56PM by Dingus.

Re: index.php running on website if Apple device used
Posted by: Otomatic (Moderator)
Date: November 06, 2021 09:34AM

Hi,

> Now I can access my websites but only using http and not https.
Secure SSL access is not just a matter of replacing http with https, that would be far too simple and a magic wand.

To be able to switch your local sites to https, see item 7 of Wampserver 3 - Some explanations

**** The VirtualHost localhost must remain with Require local

RiggsFolly has explained how to connect from a phone/tablet: see [forum.wampserver.com]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 11/06/2021 09:40AM by Otomatic.

Re: index.php running on website if Apple device used
Posted by: Dingus (---.20-3.cable.virginm.net)
Date: November 06, 2021 11:50AM

Thanks again Otomatic.

I believed I'd setup WAMP to use SSL, perhaps not.

I'm trying to get WAMP working as it should before I move forward.

I don't know what changed things as I've been messing with settings and configs, but at least I now get past www.
Unfortunately what happens now is, no matter what site I try to access WAMP only runs the first entry in httpd-vhost.conf.
I've verisfied this by swapping what entry appears first.

What a saga. WAMP is good, but.

Perhaps a removal of WAMP including entries in the Registry and start again.

I won't be doing any further work on this for a week.



Edited 2 time(s). Last edit at 11/06/2021 01:59PM by Dingus.

Re: index.php running on website if Apple device used
Posted by: Otomatic (Moderator)
Date: November 08, 2021 06:27PM

Hi,

> I believed I'd setup WAMP to use SSL, perhaps not.
Out of the box, Wampserver does not include the use of https.

> Perhaps a removal of WAMP including entries in the Registry and start again.
There is nothing in the registry about SSL and Wampserver.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: index.php running on website if Apple device used
Posted by: Dingus (---.20-3.cable.virginm.net)
Date: November 16, 2021 01:05PM

Thanks again Otomatic.
Sorry for the slow response, been away.

An update for you.
index.php no longer runs unless I omit the extension /*** ie. 127.0.0.1
Removed WAMP.
Deleted vhost and hosts.
Reinstalled WAMP.
Using WAMP's virtualhost management install. (So I know they are configered correctly.)

Now using either localhost or 127.0.0.1 with the correct extension /***** I get the correct website.
However, when I use an URL, DNS or IP, for either site I now get:

Forbidden

You don't have permission to access this resource.
Apache/2.4.46 (Win64) PHP/7.3.21 Server at 82.40.52.30 Port 80

Both sites have 'Require all granted'.

Re: index.php running on website if Apple device used
Posted by: Otomatic (Moderator)
Date: November 16, 2021 04:25PM

Hi,

> index.php no longer runs unless I omit the extension /*** ie. 127.0.0.1

I'm sorry, but to understand the difference between the two, not only do I need concrete and real examples, but also what you mean by extension. Please say:
- if I type 'http://mysitexxx/' index.php runs.
- if I type 'http://mysiteyyy/' index.php doesn't run.

> Now using either localhost or 127.0.0.1 with the correct extension /***** I get the correct website.
> However, when I use an URL, DNS or IP, for either site I now get:

Same request as above and from where?

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: index.php running on website if Apple device used
Posted by: Dingus (---.20-3.cable.virginm.net)
Date: November 16, 2021 05:37PM

Hello again Otomatic.
I used *** rather than typing each website.
Let me explain what my full setup is.

I have 2 domains with a hosting company.
These are forwarded to my IP address with the WAMP websites. For exaple 12.23.34.45/photos and 12.23.34.45/scotlodge (Both Fictitious IPs)


I don't use the index.php I use index.html in my site directories. (Hope this works ok)


If I type [mysite] (Which goes through my hosting domain) I get the forbiden message. (Both sites)
Or if I type my basic IP address I get the same 'Forbidden' result.

Only if I use a local address does either of my sites work.
localhost of 127.0.0.1 runs index.php in the www directory and this gives my the WAMPSERVER Homepage.
127.0.0.1/photos runs my photo site fine as does the 127.0.0.1/scotlodge one gives me my Lodge site.

It seems like WAMP is stopping access to any directory, including www, from outside.
As I'm getting 'Apache/2.4.46 (Win64) PHP/7.3.21 Server at 12.23.34.45 Port 80 I think it's at least reaching WAMP.

I disabled my Firewall to check it wasn't that, even though it didn't interfer before.

I'd get back to you quicker but I'm not getting email notifications.



Edited 2 time(s). Last edit at 11/16/2021 05:44PM by Dingus.

Re: index.php running on website if Apple device used
Posted by: Dingus (---.20-3.cable.virginm.net)
Date: November 16, 2021 06:35PM

Hello again Otomatic.

I found a post you helped in from 2018 where you suggested moving </VirtualHost> up to close after DocumentRoot path.

This did the trick for me. I now can get URL access.

Thanks for all your help.

Re: index.php running on website if Apple device used
Posted by: ambizop (110.226.211.---)
Date: July 08, 2022 02:37PM

same issue but i don't know how to resolve it techzpod download mobdro



Edited 1 time(s). Last edit at 07/12/2022 11:04AM by ambizop.

Re: index.php running on website if Apple device used
Posted by: Otomatic (Moderator)
Date: July 08, 2022 04:16PM

see [forum.wampserver.com]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Sorry, only registered users may post in this forum.