• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

nginx config not working for xenforo

Luxus

Well-known member
#1
I have nginx set and running for Joomla on localhost windows environment. However I can't seem to get nginx to work with xenforo. Here is my vhosts file for xenforo:

Code:
server {
    listen    127.0.0.1:80;
    server_name  localhost;

    root home/xenforo;
    index   index.php index.html;

    access_log  home/xenforo.access.log; 

    location / {
        try_files $uri $uri/ /index.php?$uri&$args;
        index index.php index.html;
    }

    location ~ /(internal_data|library) {
         internal;
    }

    location ~ \.php$ {
        try_files $uri /index.php
        fastcgi_pass    127.0.0.1:9000;
        fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_index index.php;
        include         fastcgi_params;
    }
}
Please help.
 

Jarod

Active member
#2
I have nginx set and running for Joomla on localhost windows environment. However I can't seem to get nginx to work with xenforo. Here is my vhosts file for xenforo:

Code:
server {
    listen    127.0.0.1:80;
    server_name  localhost;
 
    root home/xenforo;
    index  index.php index.html;
 
    access_log  home/xenforo.access.log;
 
    location / {
        try_files $uri $uri/ /index.php?$uri&$args;
        index index.php index.html;
    }
 
    location ~ /(internal_data|library) {
        internal;
    }
 
    location ~ \.php$ {
        try_files $uri /index.php
        fastcgi_pass    127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_index index.php;
        include        fastcgi_params;
    }
}
Please help.

Hello,

Can you try : root /home/xenforo; not root home/xenforo;
 

Luxus

Well-known member
#4
Oh I think I know the issue. My forum isn't on localhost (joomla is), but on a subdomain. How do I enter a subdomain in the server_name line without getting a couldn't find server message?

Edit: Never mind, I had a typo.