Git Product home page Git Product logo

Comments (10)

jptksc avatar jptksc commented on August 15, 2024

If you get it working, you would most likely be the first.

from dropplets.

ariselseng avatar ariselseng commented on August 15, 2024

This made it work:
This sure ain't perfect, but it works ;)

Dropplets rocks!

server {
    listen 80;
    server_name example.com;

    #access_log /home/USER/example.com/logs/access.log;
    access_log off;
    error_log /home/USER/example.com/logs/error.log crit;

    root /home/USER/example.com/www;
    location / {
        index  dropplets/index.php index.html;
        rewrite ^/(.*)$ /dropplets/index.php?filename=$1 last;

        # If the file exists as a static file serve it
        # directly without running all
        # the other rewite tests on it
        if (-f $request_filename) {
            break;
        }

        if (!-f $request_filename) {
            break;
        }
    }

    location /post {
        index index.php;
    }

    # connect with php5-fpm
    location ~ .php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php5-fpm/USER.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        include /etc/nginx/fastcgi_params;
    }

}

from dropplets.

jptksc avatar jptksc commented on August 15, 2024

Nice! Glad you like it so far.

from dropplets.

aahan avatar aahan commented on August 15, 2024

@cowai Without logs, this is pretty much all you need to get Dropplets working on Nginx (AFAIK... well, it works):

server {
    server_name aahan.dev;

    root /home/aahan/www/aahan-dev;
    index index.php index.html;

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

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        include fastcgi_params;
    }
}

from dropplets.

bcicen avatar bcicen commented on August 15, 2024

That would be set in your config.php.
On Oct 22, 2013 3:13 AM, "Tom de Bruin" [email protected] wrote:

The permalinks work fine using those directives. However, on the share via
Twitter the link is
https://twitter.com/intent/tweet?text=%22Hello%20World%22%20http://example.com:80/hello_world%20via%20@username

Note the 80 after the URL. I'm presuming Port 80. The link works
perfectly fine when coming back to the site, but any ideas how to get rid
of that?


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-26784509
.

from dropplets.

bibby avatar bibby commented on August 15, 2024

Submitted a pull to fix that minor annoyance. It matches the original intent haunted by a minor defect.

from dropplets.

liruqi avatar liruqi commented on August 15, 2024

Nginx config should be written in README or wiki.

from dropplets.

tilllt avatar tilllt commented on August 15, 2024

Ok, so i am trying to install dropplet in a subdirectory. clever me thought this could be sufficient:

location /blog/ {
try_files $uri $uri/ /index.php?filename=$uri;
}

BUT NO.

the "Continue Reading" button links to: https://www.domain.tld/blog/Postname

which results in a 404. I am not quite sure WHERE the link is supposed to go, the files resides in /www/dropplets/posts/Postname.md but i guess it should be called through the index.php somehow...

anyone got a clue on how to fix this with nginx?

from dropplets.

bcicen avatar bcicen commented on August 15, 2024

What's your server root for this context? If it's /www/, you need to be rewriting /blog/ to /dropplets/ or using

location /blog {
  try_files $uri $uri/index.php dropplets/index.php?filename=$uri
}

from dropplets.

tilllt avatar tilllt commented on August 15, 2024

thanks, this is how it seems to work for me at the end:
location /blog/ {
try_files $uri $uri/ $uri/index.php /blog/index.php?filename=$uri;
}
my server root is /www and dropplets resides in /www/blog nginx is a *** when it comes to leading / trailing slases as well.

from dropplets.

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.