Posts

Showing posts with the label Virtualhost

Apache Virtual Host Always Redirecting To /dashboard

Answer : Put this as the first line in C:\...\httpd-vhosts.conf (and restart the web server): NameVirtualHost *:80 So, it should look like this: NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost DocumentRoot "C:/xampp/htdocs" </VirtualHost> <VirtualHost *:80> ServerName walkpeakdistrict.local DocumentRoot "C:/xampp/htdocs/walkpeakdistrict_uk/public" </VirtualHost> I would place all my projects somewhere outside of C:/xampp/htdocs and C:/xampp . Let C:/xampp/htdocs be the standard localhost location, with just two files inside (simple index.php and index.html ), but use another one for the projects. Even better, use another partition, not the system partition C: . Like D:/projects , or so. So, you would have D:/projects/walkpeakdistrict_uk . Good luck. Ok, I'm not sure why this was an issue but it seems to work when I change the virtual host's server name to anything other than ".loca...

Adding VirtualHost Fails: Access Forbidden Error 403 (XAMPP) (Windows 7)

Answer : Okay: This is what I did now and it's solved: My httpd-vhosts.conf looks like this now: <VirtualHost dropbox.local:80> DocumentRoot "E:/Documenten/Dropbox/Dropbox/dummy-htdocs" ServerName dropbox.local ErrorLog "logs/dropbox.local-error.log" CustomLog "logs/dropbox.local-access.log" combined <Directory "E:/Documenten/Dropbox/Dropbox/dummy-htdocs"> # AllowOverride All # Deprecated # Order Allow,Deny # Deprecated # Allow from all # Deprecated # --New way of doing it Require all granted </Directory> </VirtualHost> First, I saw that it's necessary to have set the <Directory xx:xx> options. So I put the <Directory > [..] </Directory> -part INSIDE the <VirtualHost > [..] </VirtualHost> . After that, I added AllowOverride AuthConfig Indexes to the <Directory> options. Now htt...

Apache Gives Me 403 Access Forbidden When DocumentRoot Points To Two Different Drives

Answer : You did not need Options Indexes FollowSymLinks MultiViews Includes ExecCGI AllowOverride All Order Allow,Deny Allow from all Require all granted the only thing what you need is... Require all granted ...inside the directory section. See Apache 2.4 upgrading side: http://httpd.apache.org/docs/2.4/upgrading.html Somewhere, you need to tell Apache that people are allowed to see contents of this directory. <Directory "F:/bar/public"> Order Allow,Deny Allow from All # Any other directory-specific stuff </Directory> More info For Apache 2.4.2 : I was getting 403: Forbidden continuously when I was trying to access WAMP on my Windows 7 desktop from my iPhone on WiFi. On one blog, I found the solution - add Require all granted after Allow all in the <Directory> section. So this is how my <Directory> section looks like inside <VirtualHost> <Directory "C:/wamp/www"> Options Indexes Follow...

Client Denied By Server Configuration

Answer : In my case, I modified directory tag. From <Directory "D:/Devel/matysart/matysart_dev1"> Allow from all Order Deny,Allow </Directory> To <Directory "D:/Devel/matysart/matysart_dev1"> Require local </Directory> And it seriously worked. It's seems changed with Apache 2.4.2. For me the following worked which is copied from example in /etc/apache2/apache2.conf : <Directory /srv/www/default> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> Require all granted option is the solution for the first problem example in wiki.apache.org page dedicated for this issue for Apache version 2.4+. More details about Require option can be found on official apache page for mod_authz module and on this page too. Namely: Require all granted -> Access is allowed unconditionally. The error "client denied by server configuration" generally means that s...