<VirtualHost *:80>
ServerName mawpro.me
ServerAdmin webmaster@mawpro.me
DocumentRoot /var/www/html/library/public
<Directory /var/www/html/library/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
##.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Based on what you’ve shared, my guess would be that your .htaccess file might have permissions set that are preventing apache from reading them. If you created it as the root user this may be the case and running a recursive command to set permissions/ownership in that directory may miss the file since it is hidden.
I would recommend doing:
chown www-data.www-data .htaccess
In the directory where your .htaccess file is located, then restart Apache and see if the problem persists.
having the same problem, did the chown trick, but no change so far…(
I’ve done Enabling mod_rewrite and it works now. FYI, I followed just the Step 1 and and it works, since laravel has it’s own .htaccess file.
sudo a2enmod rewrite
sudo systemctl restart apache2
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.