Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am trying to run a Silex app within a subdirectory on one of my droplets. While I understand there’s plenty of results for this in google, nothing seems to work, so I’m hoping the community can help me out here. My server has two vhosts currently. A default that’s setup on one domain, and another on another domain. I only mention there are two in case that seems to be part of my issue. My default host config:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /usr/share/nginx/some.other.domain.name;
index index.php index.html index.htm;
server_name some.other.domain.name;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Everything works fine with it. My other server is kind of a catch-all for projects I work on, so there’s several subdirectories; all of them work fine, but there’s also not much too them. They’re either a monolithic quick and dirty php scripts and some are even just static html files. They all work fine, but the one subdirectory that uses Silex supposedly returns an Error 500. I say supposedly, because there’s no error logged by nginx or php-fpm. I’ve changed log files around to make sure they were working and even triggered errors to make sure the files were writable. Everything works as expected. Literally all the other subdirectories simply work, but Silex needs to “rewrite” urls for index.php (from their docs). I’ve tried a number of things but this is where I’ve landed for the config:
server {
listen 80;
root /usr/share/nginx/some.awesome.domain.name;
index index.php index.html index.htm;
server_name some.awesome.domain.name;
location / {
try_files $uri $uri/ =404;
}
location /silexApp {
try_files $uri /silexApp/index.php$is_args$args;
location ~ ^/index\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Is there anything that stands out to anyone? Am I completely overlooking something?? I’m still new to Nginx.
ebeecroft
68aa2215160846bca0a00f952c5fdc
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e