Comments (10)
If you get it working, you would most likely be the first.
from dropplets.
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.
Nice! Glad you like it so far.
from dropplets.
@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.
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@usernameNote 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.
Submitted a pull to fix that minor annoyance. It matches the original intent haunted by a minor defect.
from dropplets.
Nginx config should be written in README or wiki.
from dropplets.
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.
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.
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)
- Post url HOT 2
- Html tags HOT 3
- URL to a single post page not work. HOT 1
- Will Markdown return in 2.0? HOT 2
- Slight vulnerability
- Documentation website + Dropplets v1 question HOT 1
- Anyone using version 2.0 beta? HOT 2
- Apostrophe in post content causes error HOT 3
- How to upload pictures or files? HOT 1
- Add internal image and CSS upload support
- Change the default timezone HOT 1
- uploading files ? HOT 1
- How do I reset the password? HOT 1
- Files missing from folder SleekDB HOT 14
- Draft post should only show up for logged-in users
- Demo Page? HOT 1
- Featured images not showing on homepage HOT 2
- Add Ukrain lang
- SEF URL
- 404 after settings in new install HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropplets.