jeudi 23 août 2018

laravel all urls 404 without index.php

Every thing is working fine including HTTP to https redirection on browsers

http://example.com/app/login  404
https://example.com/app/login 404
http://www.example.com/app/login 404
https://www.example.com/app/login 404

http://example.com/index.php/app/login  404
https://example.com/app/index.php/login 404
http://www.example.com/index.php/app/login 404
https://www.example.com/index.php/app/login 404

URLs tested with postman

http to https redirection works fine respecting www or non www

Server Ubuntu 18.04 Apache 2.4.29

/etc/hosts  

 206.189.85.* example.com #server ip address
 206.189.85.* www.example.com
 127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/apache2/sites-available/example.com.conf

<VirtualHost *:80>
    ServerAdmin admin@example.com
    ServerName www.example.com
    ServerAlias example.com
    DocumentRoot /var/www/example.com/public

    <Directory /var/www/example.com/public/>
        Options -Indexes +FollowSymLinks +MultiVies
        AllowOverride All      
        Require all granted     
     </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    LogLevel warn
</VirtualHost>

/etc/apache2/sites-available/example.com-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin admin@example.com
    ServerName www.example.com
    ServerAlias example.com
    DocumentRoot /var/www/example.com/public

    SSLEngine On

    <Directory /var/www/html/example.com/public/>
        Options Indexes FollowSymLinks
        AllowOverride All       
        Require all granted
     </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
</VirtualHost>
</IfModule>



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2wn9NGu
via IFTTT

Aucun commentaire:

Enregistrer un commentaire