Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.
Alright, I think I have everything working now. The main things changed were the following:
Code:
##what do we do with php files
location ~ \.php$ {
include fastcgi_params;
include fastcgi_config;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
I've no idea why, but using $document_root in the fastcgi_config file I mentioned earlier did not work. I got all white pages. Putting it in the above location that specifies php files being accessed fixed this.
I then did:
Code:
location /xf/ {
try_files $uri $uri/ /xf/index.php;
index index.php;
}
If I omit the 'index index.php;' part, I get a white page when visiting the mydomain.net/xf/ page. The 'index.php?$uri&$args;' mentioned earlier also works, but the first is shorter and I get the same results.
edit:
I also defined the document root in:
Code:
server {
listen 80;
server_name mydomain.net;
access_log /var/log/nginx/mydomain.access.log;
root /home/mydomain/www;
(In general response to IfIsEvil) There is nothing wrong with using if (my config uses over 50 of them) - you just have to know when it's not appropriate to use and what commands are safe inside it.
And I don't imagine performance will be much different unless the ifs are checking existence of files, which is the perfect time for try_files.
(In general response to IfIsEvil) There is nothing wrong with using if (my config uses over 50 of them) - you just have to know when it's not appropriate to use and what commands are safe inside it.
And I don't imagine performance will be much different unless the ifs are checking existence of files, which is the perfect time for try_files.
I honestly didn't notice any performance lapses with if block. but admittedly my board is not that large so I don't know.
In theory for rewrite rules the if block is a big no no use try_files instead
Jesepi, make sure you protect the key directories, check my config suggestions.
Also, use fastcgi.conf, instead of fastcgi_params. It contains the missing params.
So to not hijack this thread, what your software does? if you can start a new thread.
I clicked on yesterday, didn't spend much time though. but I'd like to hear it from the horse's mouth