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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to