You don't have permission to access / on this server.
Posted by: wishbone (---.unitymedia.biz)
Date: June 16, 2021 01:56PM

Hello,
new install of wampserver 3.1.9 64bit. After installing all those VC++ packages, running flawlessly.
Added a new virtual server according to documentation - also worked.
Only if i call the virtualhost via [newhost], I get the error message:

Forbidden
You don't have permission to access / on this server.
Apache/2.4.39 (Win64) PHP/7.2.18 Server at newname Port 80

hm...
thx for help!

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: Otomatic (Moderator)
Date: June 16, 2021 04:16PM

Hi,

> new install of wampserver 3.1.9 64bit.
Why ?
Last version is 3.2.3 with 3.2.5 update.

What are the contents of the files:
- C:\Windows\System32\drivers\etc\hosts

- wamp64\bin\apache\apache2.4.39\conf\extra\httpd-vhosts.conf

What is the result of:
- Right-Click -> Tools -> Show virtualhost examined by Apache

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

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: wishbone (---.unitymedia.biz)
Date: June 16, 2021 05:55PM

Hi Otomatic,
thank you for your fast answer!

> > new install of wampserver 3.1.9 64bit.
> Why ?
> Last version is 3.2.3 with 3.2.5 update.
ah ok, download was from heise.de... but on your site, it's 3.2.0?

> What are the contents of the files:
> - C:\Windows\System32\drivers\etc\hosts
127.0.0.1 localhost
::1 localhost

> wamp64\bin\apache\apache2.4.39\conf\extra\httpd-vhosts.conf
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


#
<VirtualHost *:80>
ServerName newname
DocumentRoot "c:/users/gertr/documents/htdocs/new name 2021"
<Directory "c:/users/gertr/documents/htdocs/new name 2021/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

> What is the result of:
> - Right-Click -> Tools -> Show virtualhost examined by Apache
VirtualHost configuration:

Default server: localhost
Virtual Host: localhost
Virtual Host: newname

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: Victor Pittol (---.74-29-74.dyn.dsl.cantv.net)
Date: June 17, 2021 12:00AM

Change line "require local" for "require all granted"

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: Otomatic (Moderator)
Date: June 17, 2021 09:06AM

Hi,

You did not create your VirtualHost by the tool integrated in Wampserver, which makes that it misses information, for example, the hosts file should contain, in addition:
127.0.0.1 newname
::1 newname

> DocumentRoot "c:/users/gertr/documents/htdocs/new name 2021"
It is a very bad idea to install a site in the users folder, it is better to use a folder in the wamp(64)/www/ folder
or in another folder like c:\www\ or d:\www\
Also, you should avoid spaces and diacritical characters in the names of folders and files for Apache.

See
The need for Virtual Host
and
Wampserver 3 - Create or add a VirtualHost

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

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: wishbone (---.unitymedia.biz)
Date: June 17, 2021 01:30PM

Hallo Otomatic,
thx again for your answer!

> You did not create your VirtualHost by the tool integrated in Wampserver
Yes, I did, as I said
> 127.0.0.1 newname
> ::1 newname
changed that ->no cure


> It is a very bad idea to install a site in the users folder
Is it only a bad idea or not possible? If the latter, would be nice to mention this in the creation process

> Also, you should avoid spaces and diacritical characters in the names of folders and files for Apache.
removed the spaces in the folder name, also in httpd-vhosts.conf.
No cure.
Maybe need to recreate a vhost? how can I delete the existing vhost?

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: Otomatic (Moderator)
Date: June 17, 2021 02:08PM

Hi,

> Maybe need to recreate a vhost? how can I delete the existing vhost?
In the same page that contains the VirtualHost creation tool.
But first, it would be good to ALWAYS use the latest version of Wampserver, so :
- Apply Update 3.2.5 to your version of Wampserver
Wampserver update 3.2.5

The folders in the "users" tree inherit the permissions assigned to the user. There is - in principle - no Total Control authorization.

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

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: Otomatic (Moderator)
Date: June 17, 2021 02:12PM

Hi,

I add that for any modification of VirtualHost (or Apache configuration) to be taken into account it is necessary either to restart Wampserver, or to do Right-Click -> Refresh

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

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: wishbone (---.unitymedia.biz)
Date: June 17, 2021 02:50PM

Hallo
> > how can I delete the existing vhost?
> In the same page that contains the VirtualHost creation tool.
Nothing such on that page Your virtualhosts->VirtualHost Management= Add a virtualHost. There is no "delete" option.

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: Otomatic (Moderator)
Date: June 17, 2021 03:31PM

HI,

Keep your eyes open - if necessary, see an ophthalmologist!

Suppress VirtualHost form

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

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: wishbone (---.unitymedia.biz)
Date: June 17, 2021 04:25PM

you are so kind, thank you.
you mean, "supress" is "delete"?

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: Otomatic (Moderator)
Date: June 17, 2021 04:39PM

Hi,

My mother tongue is French and you know well that French people in general are not good at foreign languages.

I must admit that I never wondered about the subtle differences between "suppress" and "delete", especially since the result is the same: the "deleted" or "suppressed" VirtualHost will have disappeared from the httpd-vhosts.conf file and from the hosts file anyway.

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

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: wishbone (---.unitymedia.biz)
Date: June 17, 2021 04:53PM

"suppress" would suggest it's still there but not visible. maybe somewhre some parts still reside...
"delete" = it's not there anymore.
it did in fact dissappear from the httpd-vhosts but not from the hosts where I removed it manually. If it's only these to places...

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: Otomatic (Moderator)
Date: June 17, 2021 04:59PM

Hi,

> If it's only these to places...
Yes.

Nota bene: Suppress will be replaced by delete in Wampserver 3.2.6 update.

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

Options: ReplyQuote
Re: You don't have permission to access / on this server.
Posted by: wishbone (---.unitymedia.biz)
Date: June 17, 2021 05:08PM

"two places" of course
I've already changed to laragon, can run it without an ophthalmologist - but thx for your help anyway!
Your server is a free project, and I really do appreciate your work.

Options: ReplyQuote


Sorry, only registered users may post in this forum.