Configuring XAMMP to allow access to everything under htdocs

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Configuring XAMMP to allow access to everything under htdocs

Postby rmcape » 14. December 2022 21:07

I'm having trouble configuring XAMMP 8.0.12 to allow access to everything under htdocs on Windows 10 from my local network for testing on mobile devices.
I've set the Windows ipaddress to 192.168.1.200.
-----------
httpd.conf

Listen 80
...
DocumentRoot "C:/xampp/htdocs"
-----------

I can access htdocs/phpinfo.php from a phone on my local network.
I cannot access htdocs/foo/index.php from a phone on my local network.
I cannot access htdocs/foo/bar/index.php from a phone on my local network.

What am I missing to configure apache?
Thanks
rmcape
 
Posts: 5
Joined: 14. December 2022 20:52
XAMPP version: 8.0.12
Operating System: Windows 10

Re: Configuring XAMMP to allow access to everything under ht

Postby Altrea » 15. December 2022 10:16

Nothing. XAMPP is configured to be able to deliver htdocs/foo/index.php ( http://localhost/foo/index.php ) and htdocs/foo/bar/index.php ( http://localhost/foo/bar/index.php )
Maybe there is a subrequest in your script or a redirect that is wrong.
What is the contents of your Apache access.log?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11954
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Configuring XAMMP to allow access to everything under ht

Postby rmcape » 15. December 2022 10:22

192.168.1.8 - - [14/Dec/2022:10:06:46 -0500] "GET /public/deu/index.php HTTP/1.1" 404 300 "http://192.168.1.200/public/deu/resources.php?code=eng" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/108.0.5359.52 Mobile/15E148 Safari/604.1"
192.168.1.8 - - [14/Dec/2022:10:07:01 -0500] "GET /worldibles/public/eng/index.php HTTP/1.1" 404 300 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/108.0.5359.52 Mobile/15E148 Safari/604.1"
192.168.1.8 - - [14/Dec/2022:10:14:12 -0500] "GET /phpinfo.php HTTP/1.1" 200 100269 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/108.0.5359.52 Mobile/15E148 Safari/604.1"
rmcape
 
Posts: 5
Joined: 14. December 2022 20:52
XAMPP version: 8.0.12
Operating System: Windows 10

Re: Configuring XAMMP to allow access to everything under ht

Postby Nobbie » 15. December 2022 12:06

Can you access the same folders from the localhost?
Where did you create /public folder?
Where did you create /worldibles folder?

Do you have an index.php in the requested folders (i.e. htdocs/public/deu/index.php)? And how did you create index.php?

As you see, the error 404 is the followup of a status 300, that means a redirect. Your script does a redirect to a file which cannot be accessed.
Nobbie
 
Posts: 13233
Joined: 09. March 2008 13:04

Re: Configuring XAMMP to allow access to everything under ht

Postby rmcape » 16. December 2022 14:39

Thanks for your help.

I added this to the httpd.conf:
Listen 192.168.1.200:8000

I can successfully connect to that.
It's kind of weird.
I can connect to localhost:8000/worldbibles and then I get a listing of the directories under that.
I can click on worldbibles/public and then I get a listing of the directories under that.
Than I click on worldbibles/public/eng/ and then the index.php displays like it's supposed to.
After this manual descent, I can access all the pages correctly.

I created all of this using Visual Studio Code. This site supports 60 UI languages and pulls information from MariaDB. All of this works using localhost without any problems. It was just trying to test things on mobile devices on the same network. I've also tested this with a Kindle Fire and an iPad Air. The same behavior repeats.

I don't understand why my initial attempts to display the worldbibles/public/eng/index.php using the full path gave me a 404 but after manually descending, the full path then works.
Anyway, thanks for helping.
rmcape
 
Posts: 5
Joined: 14. December 2022 20:52
XAMPP version: 8.0.12
Operating System: Windows 10

Re: Configuring XAMMP to allow access to everything under ht

Postby Froosh » 16. December 2022 15:50

Sounds like you do not have an index.php or index.html in those folders. Some web servers will show a directory listing in that case. Some will not. A lot depends on the configuration, and in this case that would be apache.
User avatar
Froosh
 
Posts: 138
Joined: 27. March 2022 17:56
XAMPP version: 8.2.0
Operating System: Windows 11 Pro

Re: Configuring XAMMP to allow access to everything under ht

Postby Nobbie » 16. December 2022 19:47

rmcape wrote:I can connect to localhost:8000/worldbibles and then I get a listing of the directories under that.
I can click on worldbibles/public and then I get a listing of the directories under that.
Than I click on worldbibles/public/eng/ and then the index.php displays like it's supposed to.
After this manual descent, I can access all the pages correctly.


But this all happens on your Xampp PC. What about your iPhone, connecting to 192.168.1.200:8000?
Nobbie
 
Posts: 13233
Joined: 09. March 2008 13:04

Re: Configuring XAMMP to allow access to everything under ht

Postby rmcape » 19. December 2022 02:43

The iPhone, iPad, and Kindle Fire all can access the intended locations following the descending approach.
rmcape
 
Posts: 5
Joined: 14. December 2022 20:52
XAMPP version: 8.0.12
Operating System: Windows 10

Re: Configuring XAMMP to allow access to everything under ht

Postby rmcape » 19. December 2022 02:44

The iPhone, iPad, and Kindle Fire all can access the intended locations following the descending approach.
There is an index.php in all of the different subsites.
rmcape
 
Posts: 5
Joined: 14. December 2022 20:52
XAMPP version: 8.0.12
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 88 guests