nginx alias with ispconfig3: fastcgi and index problems

Discussion in 'Installation/Configuration' started by Bent Brüggemann, May 6, 2017.

  1. Bent Brüggemann

    Bent Brüggemann New Member

    Hey Guys,

    I had quite some issues with a new project because its root path must be down the road at smp/application/public/ .
    After trying and googleing around I found out it's root cause was that php-fpm needs it socket seperately defined in an alias location.

    Following configuration works for me:
    location / {
      alias /var/www/clients/client1/web6/web/smp/application/public/;
      try_files $uri $uri/ /index.php?$args ;
            location ~ \.php$ {
                   try_files $uri =404;
                   include /etc/nginx/fastcgi_params;
                   fastcgi_pass unix:/var/lib/php7.0-fpm/web6.sock;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                   fastcgi_buffer_size 128k;
                   fastcgi_buffers 256 4k;
                   fastcgi_busy_buffers_size 256k;
                   fastcgi_temp_file_write_size 256k;
                   fastcgi_read_timeout 1200;
                   fastcgi_param HTTP_PROXY "";
    - Is there a way of getting an alias without the seperate definition for fastcgi?
    - Due to this configuration im not routed to index.php as default (located in smp/application/public). Normally it's working like in many CMS and PHP frameworks that the one index.php is beeing used as the one index (everything is routed through it). Right now I'm forced to disable SEO URLs to use it classicly via GET params.


Share This Page