I've set up Pow and Apache the way they suggest in this tutorial. My httpd-vhosts.conf contains the following entry.
<VirtualHost *:80>
DocumentRoot /Users/michael/Dropbox/Development/test
ServerName test.dev
<Directory "/Users/michael/Dropbox/Development/test">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I'm still getting a 403 Forbidden when I got to http://test.dev/.
Error log says:
[Wed Nov 21 19:24:21 2012] [crit] [client 127.0.0.1] (13)Permission denied: /Users/michael/Dropbox/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Wed Nov 21 19:24:43 2012] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
Has anyone else had this problem?
This seems to have nothing to do with Pow. Apache doesn't have the necessary permissions to work within /Users/michael/Dropbox/Development/test.
Please check the permissions of this directory, I think they should be 755. Check them with:
cd /Users/michael/Dropbox/Development/
ls -l
And copy paste the line of the test directory.
The issue was the permissions. It finally worked when I chmod'd the full path to the directory I was working in to 755.
~/, ~/Dropbox, ~/Development...etc.
I'll bet there's a nicer way to do this, but it's working. So, there you go.
Related
I have installed Apache 2.4.6 on Centos7 official.
httpd.conf was not changed from default.
Configured webdav.conf with the following:
DavLockDB /var/www/html/DavLock
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html/webdav/
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access.log combined
Alias /webdav /var/www/html/webdav
<Directory /var/www/html/webdav>
DAV On
</Directory>
</VirtualHost>
webdav directory has 755 rights. DavLock not created.
I keep getting this error and not sure what the cause might be. Have tried many things without success:
[Fri Jan 29 11:41:17.027110 2021] [dav:error] [pid 15068] [client xxx.xxx.xxx.xxx:53946] The locks could not be queried for verification against a possible "If:" header. [500, #0]
[Fri Jan 29 11:41:17.027134 2021] [dav:error] [pid 15068] [client xxx.xxx.xxx.xxx:53946] Could not open the lock database. [500, #400]
[Fri Jan 29 11:41:17.027137 2021] [dav:error] [pid 15068] (13)Permission denied: [client xxx.xxx.xxx.xxx:53946] Could not open property database. [500, #1]
any ideas are welcome
Got it working now.
all files/folders under /var/www/ are chown to apache
moved DavLock to here: /var/lib/dav/
and added this line under httpd.conf:
<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/DavLock
</IfModule>
At this point, I am getting 403 error. Solved by executing the following:
chcon -R -t httpd_sys_content_rw_t /var/www/html/webdav/
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.
When moving files from my main disk (where the OS is installed), to a second disk (other storage), I am trying to redirect Apache to the new disk, but this returns error number 403. I am running Ubuntu 16.04.
I originally redirected Apache to /home/user/Documents by adding the following lines to corresponding files:
in /etc/apache2/apache2.conf
<Directory /home/jawa/Documents/>
#<Directory /media/jawa/R2D2/Webpages>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
and in /etc/apache2/sites-enabled/000-default.conf
DocumentRoot /home/jawa/Documents
#DocumentRoot /media/jawa/R2D2/Webpages
This worked fine, but since I have moved the files to a new location, I must also redirect Apache.
When trying to redirect Apache to /media/jawa/R2D2/Webpages, I toggle the above comments and restart apache using sudo service apache2 restart. Visiting localhost in the browser returns error 403 and using the command cat /var/log/apache2/error.log gives the following log:
[Wed Dec 27 17:24:48.583062 2017] [core:error] [pid 22343] (13)Permission denied: [client ::1:35704] AH00035: access to / denied (filesystem path '/media/jawa/R2D2') because search permissions are missing on a component of the path
Permissions and owners of both folders:
drwxr-xr-x 2 jawa jawa 4096 dec 27 17:12 Documents
drwxrwxrwx 1 jawa jawa 0 dec 27 16:46 Webpages
What is causing the error and how can it be fixed?
Since we know one works and the other does not, list the permissions of both the folder structures :
ls -ld /home/ /home/jawa /home/jawa/Documents
ls -ld /media/ /media/jawa/ /media/jawa/R2D2 /media/jawa/R2D2/Webpages
Once listed compare the two.
The default permissions are controlled by umask and this could result in the permissions being different.
Im setting up a localhost for the first time. I have something weird going on.
I running Fedora 24 with apache with the root folder at /var/www/html.
I have tested that this works by using vi to create an index.html which loads fine.
But now I have written some html and php files and moved them to the root dir.
Imediately I get 403 message. Log writes Out this:
[Tue Apr 04 16:06:52.116376 2017] [core:error] [pid 15260] (13)Permission denied: [client ::1:40686] AH00132: file permissions deny server access: /var/www/html/index.html
Now I create a test.html with sudo vi test.html and this file is able to load without a 403.
I then matched all the ownership and permissions to the file that loaded correctly.
And still nothing.
in the config file This stands out:
<Directory "/var/www">
AllowOverride None
Allow open access:
Require all granted
</Directory>
and:
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Am i missing somthing here?
Good Morning StackOverFlow.. I have been troubleshooting this for quite a while.
Problem: When I try to access http://newdash.new it returns a 500 error. This happens both when accessing the URL locally and over the LAN.
Running on Debian8 with Apache 2.4.10
Below is my
/etc/apache2/sites-enabled/newdash.conf
Here:
<VirtualHost *:80>
ServerName newdash.new
ServerAdmin webmaster#localhost
DocumentRoot "/var/www/newdash/public"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/newdash/public">
Order allow,deny
Allow from all
# New directive needed in Apache 2.4.3:
Require all granted
</Directory>
</VirtualHost>
And the permissions:
drwxr-xr-x 11 root root 4096 Nov 13 10:51 newdash
I can ping the named route (newdash.new) both locally and over the LAN and the ip resolves properly.
In my Apache2 error log:
[Fri Nov 13 11:45:51.345101 2015] [:error] [pid 1958] [client 10.1.1.108:56899] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/newdash/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in /var/www/newdash/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87\nStack trace:\n#0 /var/www/newdash/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\\Handler\\StreamHandler->write(Array)\n#1 /var/www/newdash/vendor/monolog/monolog/src/Monolog/Logger.php(289):
So it appears there is a permissions error on that directory..
I don't know what other information would be helpful...
Thank you.
I found the error in the error log.
[Fri Nov 13 11:45:51.345101 2015] [:error] [pid 1958] [client 10.1.1.108:56899] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/newdash/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in /var/www/newdash/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87\nStack trace:\n#0 /var/www/newdash/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\\Handler\\StreamHandler->write(Array)\n#1 /var/www/newdash/vendor/monolog/monolog/src/Monolog/Logger.php(289):
As suggested, after looking there, I realized the permissions on the /storage/logs/ folder was causing the issues.
Thank you for the suggestion arkascha!