Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Trying to set up Nginx with Symfony 3 on Windows 10

$
0
0
Hello everybody,

I am quite new with NGINX and Symfony in general, however, I've recently decided to try to start a project using these two tools after hearing a lot of positive feedbacks on both of them.

So I was able to get Nginx working on its own (using the html folder) and Symfony3 working on its own (by using the server:run command), however I can't get Symfony to work through Nginx. However, if I place the 50x.html file in the web folder of my symfony project, it is properly returned by nginx...

Here is a sample of the error from error.log:

2016/02/21 00:36:33 [error] 6260#1732: *1 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"


And this is the server section from my nginx.conf file:

server {
listen 80;
server_name localhost;
root www/projects/mysite.com/web;

rewrite ^/app\.php/?(.*)$ /$1 permanent;

location / {
index app.php;
try_files $uri @rewriteapp;
}

location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}

location ~ ^/(app|app_dev|config)\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

If someone could help me out it would be much appreciated,

Thank you!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>