I have installed Laravel 4 on my public_html folder locally, and I can access its public folder when declaring a vhost pointing to it, through the vhost url.
But, when I try to access Laravel public folder through its parent folders, I get an error in apache logs (error_log): $LARAVEL_HOME/public/.htaccess: Options not allowed here. Even if there is a AllowOverride All in $VHOST_CONF/site.
The first line in the .htaccess (Options Multiviews), is causing this error when I delete it, or put it in $VHOST_CONF/site, it works.
So, How do I do to I access through the hierarchy, without modifying the .htaccess file?
In the Apache configuration file for the website set AllowOverride to AllowOverride All similar to the following:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
# changed from None to All
AllowOverride All
Order allow,deny
allow from all
</Directory>
Related
I have custom webroot in ISPConfig configured
Code:
DocumentRoot "/var/www/clients/client1/web18/web/web/"
<Directory {DOCROOT}>
Options -SymLinksIfOwnerMatch +FollowSymLinks
</Directory>
In that root directory I have directory "manual" /var/www/site.tld/web/web/manual/ but I can't access any files in there, there are PDFs which are giving me 404 error when I am trying to access them via browser on url like http://site.tld/manual/file.PDF
Problem was that, apache has their default manual page in alias like this.
Alias /manual /usr/share/doc/apache2-doc/manual/
<Directory "/usr/share/doc/apache2-doc/manual/">
Options Indexes FollowSymlinks
AllowOverride None
Require all granted
AddDefaultCharset off
</Directory>
I had to comment first line with "alias"
Saw duplicate questions and solutions, does not seem to solve the below problem
I am trying to allow access to a folder through apache, and the /var/log/apache2/ throws the above error.
My httpd.conf is
# forbid access to the entire filesystem by default
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
I tried with Options +Indexes, Options All which doesnt seem to work. Tried to change permissions of the folder too. Added a dummy index.html in the folder as well
The folder is located at /srv/www/htdocs/testFolder.
Any ideas?
had to add files explicitly the files in the conf file
<Directory /srv/www/htdocs/HDP-UTILS-1.1.0.20>
Options +Indexes
</Directory>
<Directory /srv/www/htdocs/HDP>
Options +Indexes
</Directory>
I resolved a similar where Apache was throwing 403 error while trying to access the index.html file the issue was resolved by creating a index.hmtl in /srv/www/htdocs directory.
url: http://localhost:80/
The Suse Apache didn't create a index.html file by default don't know why.
Change your config to
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
After that create an .htaccess file in your folder and add
Options +Indexes
to it. You probably need to reload your apache.
My drupal uploaded to this location /var/www/drupal
If I want to add the AllowOverride All in apache2.conf
Which is the correct path?
<Directory /var/www/drupal>
AllowOverride All
</Directory>
or
<Directory /var/www/>
AllowOverride All
</Directory>
I assume that /var/www/drupal is the directory where you copied all the Drupal files. In that case, bot the paths are correct. There is just a difference: If you have more than one Drupal installations, for example in /var/www/drupal2 and /var/www/drupal3, then I would use the first directive you shows instead of repeating the same directive for all the directories where Drupal has been installed.
As long as the AllowOverride All directive is applied to the Drupal root directory or its parent, there is no practical difference between those directive. The only difference could be if somebody is able to write an .htaccess file in /var/www without your direct control, and you don't want anything bad happening because it.
My .htaccess file contains garbages value like
'dfdfsdfdsfdfdf'
Another file httpd.conf(/etc/apache2/httpd.conf) contains nothing
I expect at least .htaccess file to execute and display page as
internal server error
I also changed my code and change both file(.htaccess and httpd.conf) but the page index.php is displaying as if there is no both files(.htaccess and httpd.conf).
What is the cause?
httpd.conf should contain AllowOverride All for document root directory.
DocumentRoot "D:/Projects/Example/htdocs"
<Directory "D:/Projects/Example/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Otherwise, usage of .htaccess files is disabled.
I made it to work by modifying /etc/apache2/sites-available/default
AllowOverride All on
Directory /var/www/ And Directory /
I am using XAMPP for first time in Mac. Running out problems accessing other than root folder(htdocs).when I am placing my web application inside htdocs with default httpd.conf file it works when I try to point my web application url in httpd.conf it throws You don't have permission to access / on this server. error
I am aware that to modify the root folder I need to do changes to my XAMPP/etc/httpd.conf file
With Default XAMPP MAC Settings, I am trying to change Server root,Document root and Directory in XAMPP/etc/httpd.conf file the following
ServerRoot "/Applications/XAMPP/xamppfiles"
DocumentRoot "/Users/ravi/Documents/Development/Backbone/backboneboilerplate"
<Directory />
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/Users/ravi/Documents/Development/Backbone/backboneboilerplate">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
It was chmod problem. I tried giving chmod -r 777 to Development folder, backbone folder and Backboneboilerplate.. It worked.