eveseat / seat

🌀✳️ SeAT: A Simple, EVE Online API Tool and Corporation Manager
https://eveseat.github.io/docs/
GNU General Public License v2.0
434 stars 142 forks source link

Post install 404 Error with letsencrypt #740

Closed flyfearless closed 3 years ago

flyfearless commented 3 years ago

hi, I am having issues while trying to setup seat with apache2 on ssl where it is redirecting me to a 404 at https://seat.fly-fearless.net/auth/login. My Apache2 virtual host is as follows:

<VirtualHost *:80>
    ServerName seat.fly-fearless.net
    RewriteCond %{SERVER_NAME} =seat.fly-fearless.net
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    DocumentRoot /var/www/seat/public
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName seat.fly-fearless.net
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.
#     RewriteCond %{SERVER_NAME} =seat.fly-fearless.net
#     RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    DocumentRoot "/var/www/seat/public/"
    RewriteEngine on
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/seat.fly-fearless.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/seat.fly-fearless.net/privkey.pem
</VirtualHost>
</IfModule> (edited) 
warlof commented 3 years ago

Something like that should work well. However, you must consider using php fast cgi rather than php mod.

<VirtualHost *:80>
        ServerAdmin postmaster@fly-fearless.net
        ServerName seat.fly-fearless.net
        DocumentRoot /var/www/seat/public
        Redirect permanent / https://seat.fly-fearless.net/
        ErrorLog ${APACHE_LOG_DIR}/seat-error.log
        CustomLog ${APACHE_LOG_DIR}/seat-access.log combined
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName seat.fly-fearless.net
    DocumentRoot "/var/www/seat/public/"

Options +FollowSymLinks -Indexes
RewriteEngine On

RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/seat.fly-fearless.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/seat.fly-fearless.net/privkey.pem
        <Directory /var/www/seat/>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>
</VirtualHost>
</IfModule>
warlof commented 3 years ago

So, were you able to fix this?