[Wylug-help] NGINX
Simon Greenwood
sfgreenwood at gmail.com
Tue Feb 11 18:16:51 UTC 2014
Hi -
This line:
sleeyppenguin.homelinux.org;blog /
won't work, not least for the typo.
Your URLs need to use rewrite commands and unless you've missed it out you
need php-fpm configured to interpret PHP for you. If you're using Wordpress
here's a document from the horse's mouth: http://codex.wordpress.org/Nginx
s/
On 11 February 2014 17:00, Richard Ibbotson <richard.ibbotson at gmail.com>wrote:
> On Tuesday 11 Feb 2014 16:33:31 Simon Greenwood wrote:
> > Without any specifics it's hard to tell but remember that nginx
> > doesn't support .htaccess files and that you have to map URLs to
> > your pages in a configuration file or with URL handlers in your
> > code.
>
> I was able to work that out for myself. As far as I am able to
> understand I need to add a few lines for each URL. Such as /blog or
> /home. I did try this but NGINX didn't like it. Wouldn't start.....
> Pobably a few { and } missing in here which I've forgotten to put into
> this post...
>
> user www-data;
> worker_processes 4;
> pid /var/run/nginx.pid;
>
> events {
> worker_connections 768;
> # multi_accept on;
> }
>
> http {
>
> ##
> # Basic Settings
> ##
>
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> keepalive_timeout 65;
> types_hash_max_size 2048;
> # server_tokens off;
>
> # server_names_hash_bucket_size 64;
> # server_name_in_redirect off;
>
> include /etc/nginx/mime.types;
> default_type application/octet-stream;
>
> ##
> # Logging Settings
> ##
>
> access_log /var/log/nginx/access.log;
> error_log /var/log/nginx/error.log;
> }
>
> # Server (www.)mydomain.com
> server {
> listen 80;
> server_name www.sleepypenguin.homelinux.org
> sleeyppenguin.homelinux.org;blog / {
> root /var/www/; index index.html index.htm php.html;
> }
> }
>
> And later ...
>
> listen 127.0.0.1:80;
> root /var/www/;
> server_name www.sleepypenguin.home.linux.org;
> }
>
> --
> Richard
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/wylug-help
>
--
Twitter: @sfgreenwood
"TBA are particularly glib"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/wylug-help/attachments/20140211/534cf1c6/attachment.html>
More information about the Wylug-help
mailing list