Pages: Previous12
Current Page: 2 of 2
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 10, 2016 07:27PM

Let victory be yours!! and Thank you, I will follow your instructions. Enjoy your evening.

kind regards
:-)

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 10, 2016 07:37PM

WORKED WORKED WORKED!!!!

All working, so happy. Thank you so much Otomatic!

Happy!!

kindest regards
Freespirit

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: Otomatic (Moderator)
Date: July 11, 2016 10:18AM

Hi,

I am really very happy.

When I answer some users, one can have the impression that I reprimand.
Somehow, it is somewhat the case.

Data processing in general and in particular HTTP servers do not support "roughly".
You can not change the "stuff" in haphazardly and hope it will work just like a magic wand.

It requires to be rigorous, methodical, pragmatic, rational and logical; and especially to understand what we do and why we do it.

I have not been Quality Assurance Chief Inspector for nothing


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

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 11, 2016 01:25PM

lol ha ha touche!

Coder, QA Chief Inspector WOW, :-)... and not wishing to detain you any longer from assisting others, but two little issues have arisen.

1. When I put Wamp Offline, I can still access all 3 webs from Internet.
2. (since then, overnight) the 3rd Website which was showing yesterday is now Not showing with the message

"Forbidden

You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
Apache/2.4.17 (Win32) PHP/5.6.15 Server at xmex.serveblog.net Port 80"

and I don't know why. I haven't touched a thing. Any ideas to rectify this Sir?

kindest regards
free



Edited 2 time(s). Last edit at 07/11/2016 02:29PM by freespirit.

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: RiggsFolly (Moderator)
Date: July 11, 2016 02:32PM

OK I hope I have caught up with this thread, but excuse any repartition!

First, when you create Virtual Hosts, the "Put Online" and "Put Offline" functions basically becomes useless, which is why it was made a configurable option in WampServer 3 which if OFF by default.


Apache is supposed to ignore the domain configured in httpd.cond once VH's are created, thats why we create a VH for `localhost` as the first domain defined in the VH definitions file.

Once you use VH's you control access to each SPECIFIC VH independantly using the VH definitions and not "Put Online and "Put Offline"


Your VH's dont look complete to me and should be


<VirtualHost *:80>
    DocumentRoot "D:/wamp/www"
    ServerName localhost
    <Directory  "D:/wamp/www">
    	AllowOverride All
        Options Indexes FollowSymLinks MultiViews

   	Require local
        # if required allow access to local subnet BUT NEVER all
   	Require ip 192.168.1
    </Directory>
</VirtualHost>

# I assume this is your local testing domain
<VirtualHost *:80>
    DocumentRoot "e:/xmex/demdat"
    ServerName demdat
    <Directory  "e:/xmex/demdat">
    	AllowOverride All
        Options Indexes FollowSymLinks MultiViews

   	Require local
        Require ip 192.168.1
    </Directory>
</VirtualHost>

#NO-IP Domain access from internet
<VirtualHost *:80>
    DocumentRoot "e:/xmex/demdat"
    ServerName xmex.serveblog.net
    <Directory  "e:/xmex/demdat">
    	AllowOverride All
        Options Indexes FollowSymLinks MultiViews

   	Require all granted
    </Directory>
</VirtualHost>

# I assume this is your local testing domain
<VirtualHost *:80>
    DocumentRoot "f:/alignme/wellnow"
    ServerName alignme
    <Directory  "f:/alignme/wellnow">
    	AllowOverride All
        Options Indexes FollowSymLinks MultiViews

   	Require local
        Require ip 192.168.1
    </Directory>
</VirtualHost>

#NO-IP Domain access from internet
<VirtualHost *:80>
    DocumentRoot "f:/alignme/wellnow"
    ServerName well-now.serveblog.net
    <Directory  "f:/alignme/wellnow">
    	AllowOverride All
        Options Indexes FollowSymLinks MultiViews

   	Require all granted
    </Directory>
</VirtualHost>

# I assume this is your local testing domain
<VirtualHost *:80>
    DocumentRoot "g:/repo/repowp"
    ServerName repo
    <Directory  "g:/repo/repowp">
    	AllowOverride All
        Options Indexes FollowSymLinks MultiViews

   	Require local
        Require ip 192.168.1
    </Directory>
</VirtualHost>

#NO-IP Domain access from internet
<VirtualHost *:80>
    DocumentRoot "g:/repo/repowp"
    ServerName repostuff.sytes.net
    <Directory  "g:/repo/repowp">
    	AllowOverride All
        Options Indexes FollowSymLinks MultiViews

   	Require all granted
    </Directory>
</VirtualHost>


Now when you want to control access to any of your Externally visible sites you do so by editing the httpd-vhosts.conf file and then restarting Apache.

---------------------------------------------------------------------------------------------
(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 2 time(s). Last edit at 07/11/2016 02:33PM by RiggsFolly.

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: Otomatic (Moderator)
Date: July 11, 2016 02:40PM

Hi,

> 1. When I put Wamp Offline, I can still access all 3 webs from Internet.
"Normal"!
Online is an old way to allow access to the entire server, but each VirtualHost has its own authorization.

Quote

2. (since then, overnight) the 3rd Website which was showing yesterday is now Not showing with the message
"Forbidden
You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
Apache/2.4.17 (Win32) PHP/5.6.15 Server at xmex.serveblog.net Port 80"
Each VirtualHost, is there the directive:
AllowOverride all
because it seems that access to the .htaccess file is not permitted.

Where, then, for the site, would it not in the .htaccess file in the root of the site, a directive
Require all denied
or old Apache 2.2 directives such as:
Deny from All

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



Edited 2 time(s). Last edit at 07/11/2016 02:43PM by Otomatic.

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 11, 2016 04:54PM

First Wow.. to both of you.

Riggs,

.. thank you so much, single mum here welcomes your contribution with a grateful heart. Truly.

Re paragraph. Understood and learned now, got it.

Seeing the VH layout example you have given, I see the pattern and understand. I cut and pasted but get the same error page. Its this one xmex.serveblog.net. The other two load.


..Oto

1. I understand, each VH has its own authorization so Online/Offline is negated. Thank you for that!

Everything is unchanged when originally worked.


After pasting Riggs code, I ran Apache VH check

VirtualHost configuration:

Default server: localhost
Virtual Host: localhost
Virtual Host: demdat
Virtual Host: xmex.serveblog.net
Virtual Host: alignme
Virtual Host: well-now.serveblog.net
Virtual Host: repo
Virtual Host: repostuff.sytes.net
*** WARNING: Apache VirtualHost 'demdat'
*** is not defined in C:\Windows\system32\drivers\etc\hosts file

*** WARNING: Apache VirtualHost 'alignme'
*** is not defined in C:\Windows\system32\drivers\etc\hosts file


kindest regards
free

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: Otomatic (Moderator)
Date: July 11, 2016 05:25PM

Hi,

RiggsFolly is right. For utilisation you want to do (with NO-IP), its VirtualHost definitions are much better.
Automatic creations made by Wampserver are for general cases and can not be generated for some specific cases like yours.

Also, you must add "by hand" in the C:\Windows\system32\drivers\etc\host file the two missing names :
127.0.0.1 demdat
::1 demdat
127.0.0.1 alignme
::1 alignme
And for this to be taken into account without having to reboot the machine:
- Right-Click Wampmanager tray icon -> Tools -> Restart DNS

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

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 11, 2016 07:53PM

Thanks Oto, thanks Riggs

after updating and saving host file, restarted dns

VirtualHost configuration:

Default server: localhost
Virtual Host: localhost
Virtual Host: demdat
Virtual Host: xmex.serveblog.net
Virtual Host: alignme
Virtual Host: well-now.serveblog.net
Virtual Host: repo
Virtual Host: repostuff.sytes.net



Host
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

#localhost name resolution is handled within DNS itself.


127.0.0.1 localhost
::1 localhost

127.0.0.1 repostuff.sytes.net
::1 repostuff.sytes.net

127.0.0.1 well-now.serveblog.net
::1 well-now.serveblog.net

127.0.0.1 xmex.serveblog.net
::1 xmex.serveblog.net

127.0.0.1 demdat
::1 demdat

127.0.0.1 alignme
::1 alignme

127.0.0.1 repo
::1 repo
---------------------------------------------------------------------------------

but didn't work. xmex.serveblog.net still forbidden.

free.



Edited 2 time(s). Last edit at 07/11/2016 08:52PM by freespirit.

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: RiggsFolly (Moderator)
Date: July 11, 2016 11:06PM

Then we had better see the .htaccess for that domain

---------------------------------------------------------------------------------------------
(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-

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: Otomatic (Moderator)
Date: July 12, 2016 09:32AM

Hi,

I think like RiggsFolly:
> Then we had better see the .htaccess for that domain

because error
> Forbidden You don't have permission to access / on this server.

It is not: You don't have permission to access /xmex.serveblog.net/

/ is the location of the server root and it is always forbidden to access.

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

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 12, 2016 09:20PM

Hi Gentlemen,

Apologies for delay. Daughter graduated with Bachelor of Science Honours with Distinction. So been distracted ..

this is the error page

Forbidden

You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
Apache/2.4.17 (Win32) PHP/5.6.15 Server at xmex.serveblog.net Port 80

This is the .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Both the other sites work except this one. I don't know why :-/

kindest regards and grateful thanks
Free.

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: RiggsFolly (Moderator)
Date: July 12, 2016 09:46PM

Ok so we had better see the VH definition for this site as well, thats the one for xmex.serveblog.net

But it might be simpler to see all the httpd-vhosts.conf file

Oh and congratulations, you and the daughter!

---------------------------------------------------------------------------------------------
(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-

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 12, 2016 10:03PM

Thank you Riggs :-)

VH

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:[httpd.apache.org];
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
#<VirtualHost *:80>
#ServerAdmin webmaster@dummy-host.example.com
#DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
#ServerName dummy-host.example.com
#ServerAlias www.dummy-host.example.com
#ErrorLog "logs/dummy-host.example.com-error.log"
#CustomLog "logs/dummy-host.example.com-access.log" common
#</VirtualHost>


<VirtualHost *:80>
DocumentRoot "D:/wamp/www"
ServerName localhost
<Directory "D:/wamp/www">
AllowOverride All
Options Indexes FollowSymLinks MultiViews

Require local
# if required allow access to local subnet BUT NEVER all
Require ip 192.168.1
</Directory>
</VirtualHost>

# I assume this is your local testing domain
<VirtualHost *:80>
DocumentRoot "i:/xmex/demdat"
ServerName demdat
<Directory "i:/xmex/demdat">
AllowOverride All
Options Indexes FollowSymLinks MultiViews

Require local
Require ip 192.168.1
</Directory>
</VirtualHost>

#NO-IP Domain access from internet
<VirtualHost *:80>
DocumentRoot "i:/xmex/demdat"
ServerName xmex.serveblog.net
<Directory "i:/xmex/demdat">
AllowOverride All
Options Indexes FollowSymLinks MultiViews

Require all granted
</Directory>
</VirtualHost>

# I assume this is your local testing domain
<VirtualHost *:80>
DocumentRoot "m:/alignme/wellnow"
ServerName alignme
<Directory "m:/alignme/wellnow">
AllowOverride All
Options Indexes FollowSymLinks MultiViews

Require local
Require ip 192.168.1
</Directory>
</VirtualHost>

#NO-IP Domain access from internet
<VirtualHost *:80>
DocumentRoot "m:/alignme/wellnow"
ServerName well-now.serveblog.net
<Directory "m:/alignme/wellnow">
AllowOverride All
Options Indexes FollowSymLinks MultiViews

Require all granted
</Directory>
</VirtualHost>

# I assume this is your local testing domain
<VirtualHost *:80>
DocumentRoot "r:/repo/repowp"
ServerName repo
<Directory "r:/repo/repowp">
AllowOverride All
Options Indexes FollowSymLinks MultiViews

Require local
Require ip 192.168.1
</Directory>
</VirtualHost>

#NO-IP Domain access from internet
<VirtualHost *:80>
DocumentRoot "r:/repo/repowp"
ServerName repostuff.sytes.net
<Directory "r:/repo/repowp">
AllowOverride All
Options Indexes FollowSymLinks MultiViews

Require all granted
</Directory>
</VirtualHost>

-----------------------------------------------------------------------------------

regards
free

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: RiggsFolly (Moderator)
Date: July 12, 2016 11:02PM

Hmmm

Nothing shouts at me!

Can you compare this htaccess with one that works, are there any differences.

What happens when you do this :

Open a command window, and cd into your APache folder

CD \wamp\bin\apache\apache2.4.17\bin               

Then do 

httpd -t

and then 

httpd -t -D DUMP_VHOSTS

If you can copy and paste that in here it may help us

---------------------------------------------------------------------------------------------
(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 07/12/2016 11:07PM by RiggsFolly.

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 13, 2016 02:47AM

Hi Riggs,

Thank you for that.

Your statement 'hmmm' Nothing shouts at me! prompted me to re-examine the set up. It has to be me!!!

So I looked at the difference in the folders and noticed that the folders of the two websites that worked were shared on the network with all the appropriate permissions and the failed website didn't. To save time, I created a new folder, copied the contents, deleted the old folder, restarted wamp and it worked.

I apologize profusely for dragging this out a little more than was required because of my own ignorance but but have learned a lot and absolutely love the new features of wamp. Thank you so much to you and Oto!!

All 3 sites are up and running and would invite you to view contents xmex.serveblog.net in a day or two, when I have imported the contents. Thank you again.

kindest regards
free :-)

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: RiggsFolly (Moderator)
Date: July 13, 2016 10:56AM

You are welcome. Its only been a short journey for me but I am sure Oto appreciates the thanks

Its actually been fun

Enjoy

---------------------------------------------------------------------------------------------
(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-

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: freespirit (---.plus.com)
Date: July 13, 2016 09:35PM

Thank you Oto!!! :-) :-)


kindest regards
free.

Options: ReplyQuote
Re: Wamp 3 Forbidden Forbidden Forbidden
Posted by: Otomatic (Moderator)
Date: July 13, 2016 09:46PM

Hi,

Thanks. I am very happy when users problem's are solved.

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

Options: ReplyQuote
Pages: Previous12
Current Page: 2 of 2


Sorry, only registered users may post in this forum.