Mam tak skonfigurowany nginx:
[code]worker_processes 1;
events {
worker_connections 4096;
}
http {
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $request ’
'"$status" $body_bytes_sent “$http_referer” ’
‘"$http_user_agent" “$http_x_forwarded_for”’;
access_log /var/log/nginx.access.log main;
sendfile on;
keepalive_timeout 65;
upstream thin_cluster {
server 127.0.0.0:3000;
}
server {
listen 3001;
server_name sklep.local;
access_log /Users/MacBury/Sites/Rails/cart-on-rails/log/labs.local.access.log;
error_log /Users/MacBury/Sites/Rails/cart-on-rails/log/labs.local.error.log;
charset utf-8;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://127.0.0.0:3000;
break;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}[/code]
Pliki statyczne są serwowane poprawne ale już jak chcę uzyskać dostęp do mojej aplikacji railsowej dostaję 403 Forbidden. Chcę też uzyskać przypisywanie adresów w podobny sposób
jakas_nazwa.sklep.local > sklep.local/cache/jakas_nazwa
Próbowałem już parę kombinacji i mi nie wychodzi. Z góry wielkie dzięki za pomoc