You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by "nabekhan (via GitHub)" <gi...@apache.org> on 2025/01/12 18:48:31 UTC
Re: [I] When choosing to log in to access the site, uploaded photos will not be displayed due to insufficient permissions. [answer]
nabekhan commented on issue #1214:
URL: https://github.com/apache/answer/issues/1214#issuecomment-2585868793
If you are okay with your images being publicly available, I resolved this by NGIX proxy. Here is my config.
server {
server_name answer.msa.com;
# Serve static files directly
location /uploads/ {
# Use the symlink path to /var/lib/docker/volumes/root_answer-data/_data/uploads
alias /var/www/uploads/;
autoindex off;
allow all;
}
# Proxy all other requests to the application on port 9080
location / {
proxy_pass http://127.0.0.1:9080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# SSL settings managed by Certbot
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/answer.msa.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/answer.msa.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
if ($host = answer.msa.com) {
return 301 https://$host$request_uri;
}
listen 80;
server_name answer.msa.com;
return 404;
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org