Welcome! Log In Create A New Profile

Advanced

403 Forbidden, Nignx

Yunior Miguel A.
March 22, 2013 04:48PM
Hello again:

I am have public a redmine and other aplication with nginx the other
aplication is make in php, the php aplication have a api direccion for
some services, when i put the url of de aplication without the api all
is fine and not hae problem, but when I try to access the application
using the API URL the following error appears:

403 Forbidden
nginx

this is my nginx configuration for de php aplication.

server {
listen 80;
server_name appphp.nginx.com;
root /var/www/appphp;
index index.php, index.html;
location / {
include /etc/nginx/proxy_opts;
proxy_redirect off;
error_page 404 404.html;
error_page 500 502 503 504 500.html;
access_log /var/log/nginx/appphp.access.log;
error_log /var/log/nginx/appphp.error.log;

#Gzip
gzip on;
gzip_min_length 1000;
gzip_types text/plain text/css application/x-javascript text/xml
application/xml application/xml+rss #text/javascript;
gzip_disable "MSIE [1-6]\.";

charset utf-8;
}

location ~ "^(.+\.php)($|/)" {

set $script $uri;
set $path_info "/";

if ($uri ~ "^(.+\.php)($|/)") {
set $script $1;
}

if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}

include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;

fastcgi_param SCRIPT_FILENAME appphp.nginx.com$script;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param PATH_INFO $path_info;
}

}

proxy_opts configurations:


# Shared options used by all proxies
proxy_set_header Host $http_host;

# Following headers are not used by Redmine but may be useful for
plugins and
# other web applications
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;

# Any other options for all proxies here
client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;

proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

403 Forbidden, Nignx

Yunior Miguel A. March 22, 2013 04:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready