Joel Dahl
June 17, 2009 02:20PM
Igor Sysoev skrev:
> On Wed, Jun 17, 2009 at 05:44:19PM +0200, Joel Dahl wrote:
>> ...and at first it seemed to work. If the directory /home/w/
>> exists, requests to works and I can see the website. However,
>> if I try to access I get a "can't find the domain
>>" type of error message in my browser. Browsing to
>> works however, and also works.
>> What am I doing wrong? :)
> Add
> server {
> server_name_in_redirect on;
> otherwise nginx uses "_" as server name in redirect: "http://_/bar/".

Ah yes, that helped. Thanks.

However, I found another issue which is somewhat confusing, and I can't figure
out what I'm doing wrong.

In /home/w/ I have a link file to a wiki that resides in another
place in the directory structure. /home/w/ points to ->
/usr/local/www/wiki like this:

root@www [/home/w/] ls -l
drwxr-xr-x 2 root wheel - 512B Jun 16 22:13 bar/
-rw-r--r-- 1 root wheel - 20B Jun 16 21:24 index.php
lrwxr-xr-x 1 root wheel - 23B Jun 16 21:22 wiki@ -> /usr/local/www/wiki

Accessing in my browser should bring me to the front
page (index.php) on the wiki, and yes it does. It doesn't load any images or
css-files however.

I checked the logs, and found loads of entries like this one:

2009/06/17 19:30:06 [error] 38435#0: *52 open()
"/home/w/" failed (2: No such
file or directory), client:, server:, request: "GET
/lib/tpl/default/images/button-css.png HTTP/1.1", host: "",
referrer: ""

It looks like it's looking for the files in the wrong place?

I tested the same wiki in a vanilla configuration of nginx, where I just set as server_name etc, and there it works. The directory structure
is the same.

Subject Author Posted

nginx configuration issues

Joel Dahl June 17, 2009 11:44AM

Re: nginx configuration issues

Igor Sysoev June 17, 2009 01:24PM

Re: nginx configuration issues

Joel Dahl June 17, 2009 02:20PM

Re: nginx configuration issues

Cliff Wells June 17, 2009 02:46PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 73
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