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.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.5 32 bit - Apache 2.4.37 - PHP 7.2.12/7.1.24/7.0.32/5.6.38 - MySQL 5.7.23 - MariaDB 10.3.10
Wampserver 3.1.5 64 bit - Apache 2.4.37 - PHP 7.2.12/7.1.24/7.0.32/5.6.38 - MySQL 5.7.23 - MariaDB 10.3.10
PhPMyadmin 4.8.3 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

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 MySQL 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.