Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http to https redirection not working properly #421

Closed
jdepotter opened this issue Dec 21, 2020 · 1 comment
Closed

http to https redirection not working properly #421

jdepotter opened this issue Dec 21, 2020 · 1 comment

Comments

@jdepotter
Copy link

Hi,

Clicking on the title of an article tries to open http://mysite.fr/article-name. The current setup will redirect me to https://mysite.fr instead of https://mysite.fr/page.
I have another site, developed by myself, running on the same server, and http to https works well on this one.

I am using nginx with the following configuration:

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}

server {
listen 443 ssl http2;
server_name mysite.fr;

ssl_certificate /etc/nginx/ssl/mysite.fr/mysite.crt;
ssl_certificate_key /etc/nginx/ssl/mysite.fr/mysite.fr.key;

gzip on;
gzip_types
  application/javascript
  application/x-javascript
  application/json
  application/rss+xml
  application/xml
  image/svg+xml
  image/x-icon
  application/vnd.ms-fontobject
  application/font-sfnt
  text/css
  text/plain;
gzip_min_length 256;
gzip_comp_level 5;
gzip_http_version 1.1;
gzip_vary on;

location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_pass http://127.0.0.1:8080;
    proxy_redirect off;
}

location ~ ^/(css|img|js|fonts)/ {
    root /var/www/html/mysite/writefreely/static;
    # Optionally cache these files in the browser:
    # expires 12M;
}

location / {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_pass http://127.0.0.1:8080;
    proxy_redirect off;
}

}

@thebaer
Copy link
Member

thebaer commented Dec 28, 2020

Welcome, @jdepotter! Our community of users and team should be able to help with these configuration issues over on the forum -- the GitHub issue tracker is only meant for reporting bugs. Do you mind creating a topic for this over there, instead?

@thebaer thebaer closed this as completed Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants