Welcome! Log In Create A New Profile

Advanced

Newbie config not working..

December 17, 2009 02:44PM
hey all, nginx from freebsd ports 0.7.64 i386

Below is my config.

I am trying to move from a lighttpd server and try out nginx. Below is my actual config. Everything is installed from ports. and php is being run by spawn-fcgi

nginx.conf:
[code]
1 worker_processes 2;
2
3 events {
4 worker_connections 1024;
5 use kqueue;
6 }
7
8 http {
9 include mime.types;
10 default_type application/octet-stream;
11 sendfile on;
12 keepalive_timeout 65;
13
14 access_log /var/log/nginx-access.log;
15 error_log /var/log/nginx-error.log;
16
17 tcp_nopush on;
18 tcp_nodelay on;
19 charset utf-8;
20 gzip on;
21 gzip_types text/plain application/xml text/javascript;
22 gzip_min_length 512;
23
24 server {
25 listen 80;
26 server_name _;
27 server_name_in_redirect off;
28 access_log /var/log/nginx-default.log;
29
30 location / {
31 index index.html;
32 root /usr/local/www/nginx;
33 }
34
35 }
36
37
38 server {
39 listen 80;
40 server_name domain.org www.domain.org;
41 root /usr/local/www/wordpress;
42 include php_fastcgi_support;
43 index index.php;
44
45 location / {
46 try_files $uri $uri/ /index.php?q=$uri&$args;
47 }
48
49 }
50
51 server {
52 listen 443;
53 ssl on;
54 ssl_certificate /usr/local/www/ssl/server.crt;
55 ssl_certificate_key /usr/local/www/ssl/server.key;
56
57 server_name secure.domain.org;
58
59 keepalive_timeout 65;
60
61 location / {
62 root /usr/local/www/data;
63 index index.htm;
64 }
65
66 location /wiki/ {
67 alias /usr/local/www/dokuwiki/;
68 include php_fastcgi_support;
69 index doku.php;
70 }
71
72 if (!-f $request_filename) {
73 rewrite ^(/wiki/)(.*)?(.*) $1doku.php?id=$2&$3 last;
74 rewrite ^(/wiki/)$ $1doku.php last;
75 }
76
77 }
78
79 }

[/code]

php_fastcgi_support:
[code]
1 location ~ \.php$ {
2 fastcgi_pass 127.0.0.1:9000;
3 fastcgi_index index.php;
4 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
5 include fastcgi_params;
6 }
[/code]

going to http://www.domain.org/ shows the wordpress site like it should and wp-admin and the likes all seem to work (wonderful)

The part that is not working as desired is the ssl portion.

going to https://secure.domain.org works as intended; which is rendering the contents of /usr/local/www/data trying to get to https://secure.domain.org/wiki/(index.php) does not work at all.

I get the generic "no input file specified".

192.168.10.199 - - [17/Dec/2009:14:39:28 -0500] "GET /wiki/index.php HTTP/1.1" 404 62 "-"
192.168.10.199 - - [17/Dec/2009:14:40:40 -0500] "GET /wiki/doku.php HTTP/1.1" 404 62 "-"

Can someone suggest what I might be doing wrong?

thanks in advance
Subject Author Posted

Newbie config not working..

mystique December 17, 2009 02:44PM

Re: Newbie config not working..

merlin corey December 17, 2009 05:22PM

Re: Newbie config not working..

Maxim Dounin December 17, 2009 05:26PM

Re: Newbie config not working..

merlin corey December 17, 2009 05:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 62
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready