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

Only show index.php and Access denied #28

Closed
eseceve opened this issue Apr 30, 2013 · 1 comment
Closed

Only show index.php and Access denied #28

eseceve opened this issue Apr 30, 2013 · 1 comment

Comments

@eseceve
Copy link

eseceve commented Apr 30, 2013

Only show index.php but i fixed changing SCRIPT_FILENAME and adding fastcgi_index in my site configuration.

server {
  access_log /opt/boxen/log/nginx/jubila.access.log main;
  listen 80;
  root /Users/eseceve/src/jubila/www;
  server_name jubila.dev;

  client_max_body_size 50M;

  error_page 500 502 503 504 /50x.html;

  location / {
    keepalive_timeout 0;

    include /opt/boxen/config/nginx/fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass unix:/opt/boxen/data/project-sockets/jubila;
    fastcgi_index index.php;
  }
}

Now i can see http://jubila.dev/index.php and http://jubila.dev/foo.php.
But when call http://jubila.dev/some_file.css, .js or images nginx return a "Access denied".

@eseceve
Copy link
Author

eseceve commented May 1, 2013

Fixed with this

server {
  listen 80;
  server_name jubila.dev;
  root /Users/eseceve/src/jubila/www;

  location ~ \.php$ {
    #include mime.types;
    #default_type application/octet-stream;

    fastcgi_param PATH_INFO $fastcgi_script_name;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass unix:/opt/boxen/data/project-sockets/jubila;

    include /opt/boxen/config/nginx/fastcgi_params;
    fastcgi_index index.php;
  }
}

Use fastcgi only for .php files

mattheath added a commit that referenced this issue Mar 12, 2014
Added mongo extension
@eseceve eseceve closed this as completed Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant