Answer the question
In order to leave comments, you need to log in
php-fpm and symfony caching paths on subdomains?
Similar question
stackoverflow.com/questions/27637369/nginx-with-mu...
But there are folders, and I have subdomains...
There is an nginx config where:
Symfony standard app 1 and Symfony standard app 2
2 separate applications on Symfony.
They differ only in the domain name and root directory.
The first is the main domain.
The second is a subdomain.
Default - subdomain with one index.php file
# Symfony standard app 1
server {
server_name example.com;
root /foo/.../web;
location / {
try_files $uri /app.php$is_args$args;
}
location ~ ^/(app_dev|config)\.php(/|$) {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# ...
}
# Symfony standard app 2
server {
server_name bar.example.com;
root /bar/.../web;
# ...
}
# Default /baz/index.php <?php echo 1; ?>
server {
server_name baz.example.com;
root /baz;
location / {
try_files $uri /index.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Acme\Bundle\AcmeBundle(),
// ..
);
class AppKernel extends Kernel
{
public function registerBundles()
{
var_dump(new Acme\Bundle\AcmeBundle());
exit();
$bundles = array(
new Acme\Bundle\AcmeBundle(),
// ..
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question