Skip to content

@white-gecko /ontowiki
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
NGINX configuration for OntoWiki
server {
listen [::]:80 default_server ipv6only=off;
root /var/www/localhost/;
error_log /tmp/localhost-error.log;
index index.html index.htm index.php;
# You also have to set `post_max_size = 90M` and `upload_max_filesize = 90M` in php.ini
client_max_body_size 90M;
# Make site accessible from http://localhost/
server_name localhost;
# change `/ontowiki` to `/` for the location and rewrite (below) if it is installed in the root
location /ontowiki {
# check if the request is an exception and should not be handled by the index.php
if ($request_filename !~ ((extensions|libraries).*|\.(js|ico|gif|jpg|png|css|swf|json))$) {
set $is_exception "f";
}
# rewrite all other URLs to index.php
if ($is_exception = "f") {
rewrite ^/ontowiki/(.*)$ /ontowiki/index.php last;
}
}
# pass the PHP scripts to FastCGI server
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param ONTOWIKI_APACHE_MOD_REWRITE_ENABLED 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.