I'm trying to set up a virtual host for a project that I need to do.
As many tutorials define I activated the virtual host file
Include conf/extra/httpd-vhosts.conf
Placed a virtual host in te file
<VirtualHost *80>
DocumentRoot "C:\Users\Jeroen\Work\Ba\CMS\trunk"
ServerName local.ba-check.be
</VirtualHost>
The hosts file also got a line extr
127.0.0.1 local.ba-check.be
My localhost works, but it returns my document root. Also the error log always gives me this error.
[Thu Jul 07 14:22:55 2011] [error] [client 127.0.0.1] client denied by server configuration: C:/httpd-2.2-x64, referer: http://local.ba-check.be/
I hope somebody could help me.
Thanks
Problems solved
After some time I just reinstalled WAMP and then it worked great.
Related
After adding a self-signed SSL certificate, I am unable to get my Drupal site to work on localhost.
I have attempted various proposed solutions that I have found online but none have gotten me past a 400 error at https://localhost/
I have uncommented the following in httpd.conf:
LoadModule ssl_module modules/mod_ssl.so
I have Listen set to port 80 in this same file. When I set it to the SSL channel, 443, Apache does not load.
In my httpd-ssl.conf file:
I have set the paths for my server.crt and server.key files correctly.
I have enabled SSLEngine
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "/Applications/MAMP/Library/htdocs"
ServerName https://127.0.0.1:443
ServerAdmin you#example.com
ErrorLog "/Applications/MAMP/Library/logs/error_log"
TransferLog "/Applications/MAMP/Library/logs/access_log"
I have tried a variety of possibilities for the ServerName. The one above along with localhost:443 both lead to 400 errors.
I have Listen set to 443 here. Setting to 80 so it matches the httpd.conf file leads to the same result described above...not able to connect Apache.
Here is my error log for Apache:
Digest: generating secret for digest authentication ...
Digest: done
FastCGI: process manager initialized (pid 1845)
Apache/2.2.34 (Unix) mod_wsgi/3.5 Python/2.7.13 PHP/7.2.14 mod_ssl/2.2.34 OpenSSL/1.0.2o DAV/2 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.9 Perl/v5.24.0 configured -- resuming normal operations
[error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store, referer: http://localhost/MAMP/?language=English
[error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store, referer: http://localhost/MAMP/?language=English
[notice] caught SIGTERM, shutting down
I don't know enough about Apache server configuration to figure out, when I start MAMP to be able to navigate with HTTPS to my Drupal project, which is in the HTDOCs file and make it run without the 400 error.
I solved the problem by commenting out the line "Document root" above in the virtual host section.
With a LAMP server running on Ubuntu 16.04, I get the error in the log file defined as in conf :
[Tue Dec 26 16:56:35.930629 2017] [core:error] [pid 21749] (13)Permission denied: [client 127.0.0.1:43872] AH00035: access to / denied (filesystem path '/home/christophe/public_html') because search permissions are missing on a component of the path
I set my .conf file with the following :
<VirtualHost *:80>
ServerName memory.test
ServerAlias www.memory.test
DocumentRoot /home/christophe/public_html/memory/web
<Directory /home/christophe/public_html/memory/web>
AllowOverride All
Require all granted
Allow from all
</Directory>
ErrorLog /var/log/apache2/memory_error.log
CustomLog /var/log/apache2/memory_access.log combined
</VirtualHost>
The access right are set for user christophe:christophe and www-data is part of the group christophe, the mod is 775 but even with the www-data:www-data I get the error.
The /etc/hosts file contains the line :
127.0.0.1 memory.test
I seem to not have selinux installed as this solution is given in some other questions. I would not consider myself as a newbee and I succeeded to have many test environments working this way but this linux is a fresh installation and for a while no other website is working on it...
Did you check that you have 0644 in the directory you are trying to serve?, besides, you also give permissions to www-data user to access that directory, note that the folder you are trying to serve is located in your home directory.
I have a virtual machine base box for Debian wheezy that I've been using with vagrant for the last few months without any issues, however yesterday when I brought up a new machine and updated/upgraded packages I started getting a FastCGI server connection failure error:
[Wed Jun 04 14:39:03 2014] [error] [client 10.0.2.2] (13)Permission denied: FastCGI: failed to connect to server "/vagrant/php5-fcgi": connect() failed
[Wed Jun 04 14:39:03 2014] [error] [client 10.0.2.2] FastCGI: incomplete headers (0 bytes) received from server "/vagrant/php5-fcgi"
I am able to resolve the issue temporarily by manually touching and chmodding /tmp/php5-fpm-vagrant.sock, but my question is why did it start happening all of a sudden?
Personal preferences aside, is there anything functionally wrong with my configuration?:
In my apache sites available I have a file called 000php containing:
FastCgiExternalServer /vagrant/php5-fcgi -socket /tmp/php5-fpm-vagrant.sock -pass-header Authorization
Since apache loads sites alphabetically, this always gets loaded first, then I have another file called vagrant that contains:
<VirtualHost *:80 *:8080>
DocumentRoot /vagrant/public_html/
ServerName vagrant.localhost
<Directory /vagrant/>
AllowOverride all
</Directory>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /vagrant/php5-fcgi
ErrorLog ${APACHE_LOG_DIR}/vagrant_error.log
CustomLog ${APACHE_LOG_DIR}/vagrant_access.log combined
</VirtualHost>
and a php fpm pool config called vagrant.conf that looks like this:
[vagrant]
listen = /tmp/php5-fpm-vagrant.sock
listen.allowed_clients = 127.0.0.1
user = vagrant
group = vagrant
pm = ondemand
pm.max_children = 50
any suggestions would be greatly appreciated
Figured out the answer, this was caused by https://bugs.php.net/bug.php?id=67060
The fix was to add the following lines to my vagrant.conf php fpm configuration file and restart php fpm, a reload was not enough
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
i have read in a similar post as to how to change the document root in ubuntu xampp which said to change documentroot value & the <directory> tag values to my preferred address..
i tried and its wasnt working. i realised that my drive is named with spaces in between like "my drive" and after a little search i found that i should use "my\ drive" to include the space in between the words.. but now i have another error..
httpd.conf value:
DocumentRoot "/media/my\ drive/xampp/htdocs"
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Sorry, I've no idea what's going wrong.
XAMPP: Please contact our forum http://www.apachefriends.org/f/
i checked error_log file which says
[Tue Aug 14 00:08:21 2012] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied
[Tue Aug 14 00:08:47 2012] [notice] caught SIGTERM, shutting down
Syntax error on line 179 of /opt/lampp/etc/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 179 of /opt/lampp/etc/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 179 of /opt/lampp/etc/httpd.conf:
DocumentRoot must be a directory
Syntax error on line 179 of /opt/lampp/etc/httpd.conf:
DocumentRoot must be a directory
it is a valid directory in which i have my windows 8 os installed..
It should work without the \, because there are already quotes around the path. In the directory tag you should be able to put quotes around your path too, if not, try the \ there.
I have been using xampp for a while now without any problem. All of a sudden I start xampp today and I am getting an "Error 403 Access Forbidden" when I try to go to my Localhost.
When I check the error logs for apache it says:
[Mon Mar 22 21:48:57 2010] [error] [client 127.0.0.1] client denied by server configuration: D:/xaamp
This is strange, it should first of all say "C:" and second of all say "Xampp" (not xaamp). Where would I change this is my config files. Have no idea how this could have happened.
I think this will be an Apache configuration problem. The configuration should be found in your httpd.conf at the location below:
\xampp\apache\conf\httpd.conf
Then find this property:
DocumentRoot
What does it say? It should say:
DocumentRoot "C:\xampp\htdocs"