index.php 403 forbidden error when accessing site from another pc
Posted by: fiona997 (---.transport.gov.pg)
Date: March 29, 2017 07:11AM

1. Win 7 Ultimate 32bit
2. WampServer 3.0.8 32 bit
3. Apache Version 2.4.23
4. PHP Version 5.6.25
5. MySQL Version 5.7.14
6. Green
7. Hosts file:
127.0.0.1 localhost
::1 localhost
8. Yes
9. Yes
10. You don't have permission to access /mis:8080/index.php on this server
11. MS Essentials, Windows Firewall
12. C:\wamp\
13.
<VirtualHost *:8080>
ServerName mis
DocumentRoot "c:/wamp/www/mis"
<Directory "c:/wamp/www/mis/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
----------------------------
I'm trying to access a site I created on a PC in the same LAN as my WampServer. On the machine that has WampServer installed, everything works fine. But on another PC in the same LAN, when I type in the URL: mis:8080 I can see the homepage and I have access to everything in the backend of my site, but when I click on other links in the frontend of the site it gives the 403 forbidden error.

Options: ReplyQuote
Re: index.php 403 forbidden error when accessing site from another pc
Posted by: RiggsFolly (Moderator)
Date: March 29, 2017 10:44AM

Hi,

A couple of things:

1. Please show all your httpd-vhost.conf file

2. Is your site a WordPress site.

3. Why are you using a non standard port number for your web server?

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.7.5> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-



Edited 1 time(s). Last edit at 03/29/2017 10:46AM by RiggsFolly.

Options: ReplyQuote
Re: index.php 403 forbidden error when accessing site from another pc
Posted by: fiona997 (---.transport.gov.pg)
Date: April 05, 2017 04:43AM

# Virtual Hosts
#

<VirtualHost *:8080>
ServerName localhost
ServerAlias localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#



<VirtualHost *:8080>
ServerName mis
DocumentRoot "c:/wamp/www/mis"
<Directory "c:/wamp/www/mis/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Yes, its a Wordpress site.
I previously installed IIS and that was using port 80. So at one point, I had both IIS and Wampserver installed on the same machine. After I had issues installing Wordpress on IIS, I uninstalled both IIS and Wampserver then reinstalled Wampserver. I followed instructions from a post on how to get Wampserver icon green after uninstalling IIS and that 'solved' that issue. But I got an error when trying to view the wampserver homepage. When I changed the port to 8080, I could view the wampserver hompage so I just let it be and went on with it.

Options: ReplyQuote
Re: index.php 403 forbidden error when accessing site from another pc
Posted by: RiggsFolly (Moderator)
Date: April 05, 2017 10:17AM

Hi

When you install IIS it brings a lot of other stuff with it and they all share port 80.

So go to Start -> Control Panel -> Programs and Features
Click the 'Turn windows features on and off' link in the left hand menu.
Wait for the list to load and then find 'Internet Information Services'

Un check the check boxes for the following items ( you may not see all of them ), and there may be others I done know about. You may have all of these or just some of these.

1. IIS
2. Web Deploy 2.0 (Web Deployment Agent Service)
3. MS Sql Server Reporting service.
4. BranchCache ( Windows 8.1 )
5. SQL Server VSS Writer

Now you can probably move the port number back to port 80.

Other than that, this seems to be the standard WordPress beginners issue. WordPress stored the url that you use when you install it. So if you install it before you have setup the Virtual Host using something like `[localhost]` then it remembers the `[localhost]` part of the url in its database.

Then when you use the VH domain name `[mis]` it loads the homepage, but all links it generates internally are built with the original `[localhost]`. Of course when you run this from another PC `localhost` means THIS PC and it cannot find a web site on this other PC.

remove the WordPress install, and reinstall on the WAMPServer PC using the VH domain i.e. `[mis]` and then all the links will work when you try and use the site from another PC on your network.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.7.5> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote


Sorry, only registered users may post in this forum.