error accessing over network
Posted by: wrkadri (---.rkfns.net)
Date: August 14, 2018 11:11AM

Hey,

I am completely new to wampserver. I am using wampserver Version 3.1.3 - 64bit installed on windows 10 x64, Apache version 2.4.33, PHP version 5.6.35, mySQL version 5.7.21 and MariaDB version 10.2.14.

My virtual host file looks like this:
# 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>

I have two problems when accessing this over LAN.

1 - When I access the wampserver homepage from other computers, the page opens with these two error messages at the bottom:

The path ${INSTALL_DIR}/www for DocumentRoot does not exist (File c:/wamp64/bin/apache/apache2.4.33/conf/extra/httpd-vhosts.conf)
The path ${INSTALL_DIR}/www/ for <Directory ... does not exist (File c:/wamp64/bin/apache/apache2.4.33/conf/extra/httpd-vhosts.conf)

2 - I cannot access phpmyadmin over LAN. I am receiving 403 forbidden error message.

Can you please help me with this?

Thank you



Edited 1 time(s). Last edit at 08/14/2018 11:33AM by wrkadri.

Options: ReplyQuote
Re: error accessing over network
Posted by: Otomatic (Moderator)
Date: August 14, 2018 12:30PM

Hi,

The Wampserver home page (localhost) is exclusively local and must remain local.
So, reset the localhost VirtualHost definition to the initial state.

Require for localhost must always be Require local.

You must create your own page which must be defined as VirtualHost and can be accessed from the network.
See : The need for Virtual Host and Wampserver 3 - Create or add a VirtualHost

As for PhpMyAdmin access, you must edit the alias (wamp\alias\phpmyadmin.conf) to replace Local Require.

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

Options: ReplyQuote
Re: error accessing over network
Posted by: wrkadri (194.126.31.---)
Date: August 14, 2018 02:15PM

Thank you Otomatic for your prompt and clear reply.

I managed the virtual hosts following your recommendations. But unfortunately I didn't manage to access phpmyadmin over LAN.

If you have any reference it would be great. Else, I will manage to find something online.

Thank you again.

Options: ReplyQuote
Re: error accessing over network
Posted by: RiggsFolly (Moderator)
Date: August 14, 2018 02:44PM

Hi,

Edit wamp64/alias/phpmyadmin.conf

It shoud look like this initially

Alias /phpmyadmin "c:/wamp64/apps/phpmyadmin4.8.2/"

<Directory "c:/wamp64/apps/phpmyadmin4.8.2/">
	Options +Indexes +FollowSymLinks +MultiViews
  AllowOverride all
  <ifDefine APACHE24>
		Require local
	</ifDefine>
	<ifDefine !APACHE24>
		Order Deny,Allow
    Deny from all
    Allow from localhost ::1 127.0.0.1
	</ifDefine>

# To import big file you can increase values
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>


Now lets assume your WAMPServer PC is on 192.168.1.10, so your lan subnet is 192.168.1
So to allow any ip on that subnet add the line below that I markd with a comment

Alias /phpmyadmin "c:/wamp64/apps/phpmyadmin4.8.2/"

<Directory "c:/wamp64/apps/phpmyadmin4.8.2/">
	Options +Indexes +FollowSymLinks +MultiViews
  AllowOverride all
  <ifDefine APACHE24>
		Require local

# NEW LINE
		Require ip 192.168.1
	</ifDefine>
	<ifDefine !APACHE24>
		Order Deny,Allow
    Deny from all
    Allow from localhost ::1 127.0.0.1
	</ifDefine>

# To import big file you can increase values
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

Of course change the number to match your lan subnet

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 08/14/2018 02:45PM by RiggsFolly.

Options: ReplyQuote
Re: error accessing over network
Posted by: wrkadri (---.rkfns.net)
Date: August 14, 2018 02:58PM

Works like a charm.

Thank you RiggsFolly

Options: ReplyQuote


Sorry, only registered users may post in this forum.