pierobot / mangapie

This is a self-hosted server for archived manga.
BSD 3-Clause "New" or "Revised" License
65 stars 9 forks source link

HTTPS automatic redirection #128

Closed donotos closed 5 years ago

donotos commented 5 years ago

Hello.

I'm trying to use mangapie but i can't seem to make it work the way i want. i installed it using the wiki and everything seems to be alright. the only thing i tweeked is the nginx config that look like this now:

server {
    listen 80;
    server_name mangapie;
    root /var/www/mangapie;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ^~ /avatars {
        internal;
        alias /var/www/mangapie/storage/app/avatars/;
    }

    location ^~ /covers {
        internal;
        alias /var/www/mangapie/storage/app/covers/;
    }

    location ~ \.php$ {
        try_files $uri =404;

        include fastcgi.conf;
        fastcgi_index index.php;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    }
}

a very simplified one because i don't need ssl or to be more precise it must not be ssl encrypted since all my websites are reverse proxyfied through an nginx reverse proxy (yunohost)

but no mater what i do every time i hit the index.php it automatically switch to https i have the same issue after switching to apache.

can you help me? thanks

donotos commented 5 years ago

well answering myself here. in fact it is pretty easy to reverse proxy an ssl encrypted website with nginx:

https://www.nginx.com/blog/nginx-ssl/

pierobot commented 5 years ago

Sorry for the late reply. Did you change APP_URL in .env file to http:// ?

donotos commented 5 years ago

yes i think i did but i made it work on https with nginx, i just needed to change my conf file a little to make it work. and i left APP_URL blank so that it does not rewrite the url. it work well that way.

oh by the way are you still active on that project? it do the job as it is but i have some ideas to make it even better.

pierobot commented 5 years ago

Yes, I work on this project when I get the chance. If I don't push any commits it's likely because I'm too busy with work.

Feel free to post suggestions in another issue. Always looking for ways to improve it - mainly UI.