# Phpbb problems

**URL:** <https://www.ruby-forum.com/t/phpbb-problems/237057>\
**Category:** NGINX\
**Created:** [October 22, 2013, 12:04pm UTC](https://www.ruby-forum.com/t/phpbb-problems/237057 "2013-10-22T12:04:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 22, 2013, 12:04pm UTC](https://www.ruby-forum.com/t/phpbb-problems/237057/1 "2013-10-22T12:04:01Z")

</div>

I am having some problems with phpbb loading the style sheets for the  
admin  
area, and also the URLs look strange which could be related. I am using  
an  
nginx server config I pulled off the web which is suppossed to be  
equivalent  
of the Apache httpd rewrite rules, but they don’t seem to be enough.

server {  
server\_name [forumobfuscated.onion](http://forumobfuscated.onion);  
root /var/www/sites/obfuscated\_forum;  
access\_log /home/obfuse/access\_log;  
error\_log /home/obfuse/error\_log;  
index index.php index.html index.htm;

```
    location ~

```

/(config.php|common.php|cache|files|images/avatars/upload|includes|store)  
{  
deny all;  
return 403;  
}

```
    location ~* \.(gif|jpeg|jpg|png|css)$ {
            expires 30d;
    }

    location ~ \.php$ {
            fastcgi_pass 127.0.0.1:9002;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME

```

/var/www/sites/obfuscated\_forum$fastcgi\_script\_name;  
fastcgi\_param QUERY\_STRING $query\_string;  
fastcgi\_param REQUEST\_METHOD $request\_method;  
fastcgi\_param CONTENT\_TYPE $content\_type;  
fastcgi\_param CONTENT\_LENGTH $content\_length;  
fastcgi\_param PATH\_INFO $fastcgi\_script\_name;  
fastcgi\_read\_timeout 360;

```
           include fastcgi_params;
    }

```

}

That is what I am using, URLs appear strange.

This is what a link to the admin area looks like:  
[http://obfuscatedforum.onion/adm/index.php/index.php?sid=e74213251b1867be1ca25ba667c4cb6b](http://obfuscatedforum.onion/adm/index.php/index.php?sid=e74213251b1867be1ca25ba667c4cb6b)

It does load and I can use the pages but the CSS stylesheet isn’t coming  
through, nor are the images. It would be good if phpbb was mentioned in  
the  
nginx wiki like drupal and other sites.

Posted at Nginx Forum:

> **[phpbb problems](https://forum.nginx.org/read.php?2,243973,243973#msg-243973)**
>
> I am having some problems with phpbb loading the style sheets for the admin area, and also the URLs look strange which could be related. I am using an nginx server config I pulled off the web which is suppossed to be equivalent of the Apache httpd...

---

<div class="post-metadata">

**Author:** ![cyrus\_the\_great](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e95f7d/32.png) [@cyrus\_the\_great](https://www.ruby-forum.com/u/cyrus_the_great)\
**Post date:** [October 22, 2013, 10:24pm UTC](https://www.ruby-forum.com/t/phpbb-problems/237057/2 "2013-10-22T22:24:50Z")

</div>

On Tue, Oct 22, 2013 at 06:03:40AM -0400, cyrus\_the\_great wrote:

Hi there,

> I am having some problems with phpbb loading the style sheets for the admin  
> area, and also the URLs look strange which could be related.

Can you identify the exact urls of the style sheets that do not respond  
the way you want?

Can you tell where the strange-looking URLs come from – nginx config  
or phpbb config or something else?

> ```
> root /var/www/sites/obfuscated_forum;
> 
> ```

> ```
> location ~
> 
> ```
> 
> /(config.php|common.php|cache|files|images/avatars/upload|includes|store)  
> {  
> deny all;  
> return 403;  
> }

So, if the url includes any of those strings, it is denied.

> ```
> location ~* \.(gif|jpeg|jpg|png|css)$ {
> expires 30d;
> }
> 
> ```

If the url ends in one of those strings, it should be served directly  
from /var/www/sites/obfuscated\_forum.

Does that include your style sheet url?

Is the matching file present?

> ```
> location ~ \.php$ {
> fastcgi_pass 127.0.0.1:9002;
> 
> ```

> ```
> fastcgi_param SCRIPT_FILENAME
> 
> ```
> 
> /var/www/sites/obfuscated\_forum$fastcgi\_script\_name;

> ```
> }
> 
> ```

If the url ends in .php, it gets sent to the fastcgi server.

> This is what a link to the admin area looks like:

[http://obfuscatedforum.onion/adm/index.php/index.php?sid=e74213251b1867be1ca25ba667c4cb6b](http://obfuscatedforum.onion/adm/index.php/index.php?sid=e74213251b1867be1ca25ba667c4cb6b)

The repeated /index.php looks odd. Did you type that? Or did something  
link to it?

> It does load and I can use the pages but the CSS stylesheet isn’t coming  
> through, nor are the images.

What do the nginx log files say about the CSS stylesheet and images  
requests?

> It would be good if phpbb was mentioned in the  
> nginx wiki like drupal and other sites.

[Getting Started | NGINX](http://wiki.nginx.org/Configuration) links to a suggested config file for  
phpBB3.

It is not identical to what you have here.

## f

Francis D. removed\_email\_address@domain.invalid
