Coder Social home page Coder Social logo

Comments (5)

PeeHaa avatar PeeHaa commented on July 18, 2024

If you are planning to run it on a dedicated subdomain you can use something like this:

server {
    listen 80;

    server_name opcachegui.domain.com;
    root /srv/www/OpCacheGUI/public;

    location ~ ^/(.*).php($|/) {
        fastcgi_split_path_info ^(.+.php)(.*)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_pass   127.0.0.1:9000;
        include        fastcgi_params;
    }

    location / {
       index index.php;
            try_files $uri /index.php?$args;
    }
}

from opcachegui.

ewwink avatar ewwink commented on July 18, 2024

how if in subdirectory?

from opcachegui.

hussanhijazi avatar hussanhijazi commented on July 18, 2024

+1

from opcachegui.

ViktorAksionov avatar ViktorAksionov commented on July 18, 2024

settings for subdirectory which works fine for me:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;
#in this example path for root folder
    root /var/www/yourdomain.com/public_html;
    index index.php index.html index.htm;
    server_name yourdomain.com;
    access_log /var/log/nginx/yourdomain.com_access.log;
    error_log /var/log/nginx/yourdomain.com_error.log;
#lets say your files are here: /var/www/yourdomain.com/public_html/opcachegui/public
#so they will be avaialble from URI : yourdomain.com/opcachegui/public
    location /opcachegui/public {
        index index.php;
        try_files $uri $uri/ /opcachegui/public/index.php?$query_string;
    }
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

from opcachegui.

ffflabs avatar ffflabs commented on July 18, 2024

+1 I got it working with a similar syntax

location / {
           try_files $uri $uri/ /index.php?$request_uri;
      }

from opcachegui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.