I am using Linux mint. I am working in a Wordpress, It was not possible navigate a page. I got a answer from a source to change the apache2.conf file like bellow
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
to
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
But for me the phpmyadmin is not working after this change. For that problem i go for this
Adding
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
in the phpmyadmin.conf file. But still it is working. Is there are anything i have left.
Thanks in advance.
Related
I have never had this issue before, it was working perfectly and after I reinstalled the server I now got a 404 when I call my 0.0.0.0/api/students/show.
I did composer production call on SSH to create latest autoloader. Cleared the cache for php artisan, the normal steps to setup a Laravel production app. But I still get 404 when I call the API endpoint.
Maybe the problems is something with chmod rights? Storage, etc. is already done...
In your apache2.conf make sure you've AllowOverride All and not AllowOverride none.
Example
<Directory /var/www/html/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Original Answer
You should not need to write Directory at all.
This is my working page custom .conf file on sites-available folder:
<VirtualHost *:80>
ServerName matiaslauriti.dev
ServerAlias www.matiaslauriti.dev
Redirect 301 / https://matiaslauriti.dev
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName matiaslauriti.dev
ServerAlias www.matiaslauriti.dev
DocumentRoot /var/www/html/public
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/matiaslauriti.dev/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/matiaslauriti.dev/privkey.pem
</VirtualHost>
</IfModule>
What I do have on my apache2.conf is default, I did not change anything:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options +FollowSymLinks -Indexes
AllowOverride All
Require all granted
</Directory>
i have a problem with phpmyadmin installation via brew, i have modified my root directory to point to /Users/username/Sites in /usr/local/etc/apache2/2.4/httpd.conf.
I have put this in the same file :
Alias /phpmyadmin #{HOMEBREW_PREFIX}/share/phpmyadmin
<Directory #{HOMEBREW_PREFIX}/share/phpmyadmin/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
I use virtual host, so i create a symlink of the folder /usr/shar/phpmyadmin in /Users/username/Sites and create a phpmyadmin.conf like this:
<Directory "/Users/amerej/Sites/phpmyadmin">
Allow From All
AllowOverride All
Options +Indexes
Require all granted
</Directory>
<VirtualHost *:*>
ServerName phpmyadmin.localhost
DocumentRoot "/Users/amerej/Sites/phpmyadmin"
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9071/Users/amerej/Sites/phpmyadmin/$1
</VirtualHost>
I user follow this tutorial for using multiple versions of php :
https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/
Thank you if can help me i try to solve my problem alone but don't find the solution.
I have an apache server on ubuntu where i have a virtual host that points to my site. Problem is my htaccess not functional.
In my apache2.conf file i have something like
<Directory />
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
if i change AllowOverride for "www" directory htaccess is functional but i get 403 forbidden error. please guide me what i am doing wrong.
regards.
You have to set AllowOverride to all like this.
<Directory "/var/www">
AllowOverride All
</Directory>
After that if you are facing forbidden error then probably you have error in htaccess file. Remove the code in htaccess file then start writing code block by block. By this you can debug error in htaccess file. For more info, you can have a look on this.
https://askubuntu.com/questions/429869/is-this-a-correct-way-to-enable-htaccess-in-apache-2-4-7-on-ubuntu-12-04#answer-429931
I modified the file etc/apache2/apache2.conf for a WordPress permalink problems, but now I can't access on my localhost.
I changed
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all denied
</Directory>
to
Options Indexes FollowSymLinks
AllowOverride FileInfo
Require all granted
After a2enwrite and reload apache2 my server doesn't work.
I work on Ubuntu 16.04 LTS. Can you help me?
Currently, when my users are buying from my shop it will go to:
http://localhost.com/shop/index.php?shopid=1&item=2
How would I make it to where it would be like
1 being shopid, 2 being item.
http://locahost.com/shop/1/2
Try the following in your .htaccess file
RewriteEngine On
RewriteRule ^shop/([^/.]+)/([^/.]+)?$ shop/index.php?shopid=$1&item=$2 [L,NC]
Hope it works.
This option is in your httpd.conf file.
change it from
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
to
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>