Results 1 to 4 of 4
-
09-23-2009, 05:04 PM #1Aspiring Evangelist
- Join Date
- Oct 2005
- Posts
- 435
Nginx issue on IPB forum 3.0 (most of it is resolved, just some questions)
Hi there,
I have been trying to solve this issue but ran into a roadblock. I know the answer is right there. I know there are a few nginx people on here who might just see my silly mistake here.
I am using the latest nginx and the latest phpfpm.
The problem relates to a FURL issue with IPB 3.0 forum which uses htacess. I have figured out most of the problem related to that so far.
Reference: http://nginxforums.com/index.php/topic,187.0.html
Basically the forum is in the /discuzz subdirectory so it would be seen as domain.com/discuzz
I also found out I have to make a location / for both /discuzz and /discuzz/ in the nginx config. I guess there is no way around having 2 separate entries just so both domain.com/discuzz and domain.com/discuzz/ would work.
I almost have it but now I have 2 more issues to resolve. First it seems that I am unable load the graphics that are part of the forum skin (permission denied error). Since the files are owned by a specific user and php-fpm is ran by that same user, I'm not sure why the graphics can't be loaded. Any ideas?
The other issue I have is that domain.com not working. I get a 403 error when I go to domain.com or even if I specifically type a file (domain.com/index.html). Is there something wrong with my config to cause this issue?
I've used this setting before on other sites and it was fine. I don't think having the /discuzz below might have anything to do with the error.
Thanks!
server {
listen 80;
server_name domain.com;
rewrite ^/(.*) http://www.domain.com/$1 permanent;
}
server {
listen 80;
server_name www.domain.com;
root /home/user/domain.com;
location / {
index index.php index.html index.htm;
}
# This is the php-fpm section.
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /discuzz/ {
index index.php index.htm index.html;
try_files $uri $uri/ /discuzz/index.php?q=$uri;
}
location /discuzz {
index index.php index.htm index.html;
try_files $uri $uri/ /discuzz/index.php?q=$uri;
}
location ~ /\.ht {
deny all;
}
}
-
09-24-2009, 03:34 PM #2Aspiring Evangelist
- Join Date
- Oct 2005
- Posts
- 435
does anyone else an idea?
-
09-25-2009, 05:19 PM #3Web Hosting Guru
- Join Date
- Nov 2003
- Location
- Kherson, Ukraine
- Posts
- 267
Permission problem is because of running nginx by nobody user. nobody is default username if "user" directive not specified.
There is a lot of ways to solve the problem. For example
1. Run nginx by same user as php. Add to nginx.conf the directive
user someuser;
It will not work if you have few users who runs php scripts
In this case possible
2. Add user "nobody" to group of each user. Edit /etc/group file. You'll need permissions 640 for files and 750 for directories.
3. Insecure way - set permissions 755 for users directories and 644 for files.Private remote administrator of Linux servers - www.petrov.ks.ua
Quality hosting - Host-Web-Site.com
-
09-28-2009, 02:29 PM #4Aspiring Evangelist
- Join Date
- Oct 2005
- Posts
- 435
thanks!
Hi there,
I actually solved this issue but I didn't respond to this because I didn't think anyone cared
I wish your advice came sooner though thanks for that.
You are absolutely correct on it. I HAD to specify a user entry in the config which I didn't do. Basically it was just a
Code:user username groupname;
Thanks again.
Similar Threads
-
[RESOLVED] DevFly content issue
By the_pm in forum Web Design and ContentReplies: 3Last Post: 10-30-2007, 03:49 PM -
Ben Gabler issue - RESOLVED
By AcBush in forum Web Hosting LoungeReplies: 77Last Post: 03-25-2006, 02:45 PM -
[Issue RESOLVED] The Planet is the worst!
By Kyle Korleski in forum Web HostingReplies: 46Last Post: 07-19-2005, 02:30 PM -
My Issue with UKHost4u.com is resolved
By martyboy101 in forum Web HostingReplies: 3Last Post: 10-19-2004, 07:44 PM -
Issue needs to be resolved.
By someuser in forum Web HostingReplies: 15Last Post: 05-06-2004, 08:47 AM