Nginx:Vhost MediaWiki: Difference between revisions
No edit summary |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Tanpa SSL== | ==Tanpa SSL== | ||
<syntaxhighlight lang="nginx" line="1"> | |||
server { | |||
listen 80; | listen 80; | ||
listen [::]:80; | listen [::]:80; | ||
| Line 30: | Line 31: | ||
include snippets/fastcgi-php.conf; | include snippets/fastcgi-php.conf; | ||
} | } | ||
} | |||
</syntaxhighlight> | |||
==SSL Origin CloudFlare== | ==SSL Origin CloudFlare== | ||
<syntaxhighlight lang="nginx" line="1"> | |||
server { | |||
listen 80; | listen 80; | ||
listen [::]:80; | listen [::]:80; | ||
| Line 91: | Line 94: | ||
include snippets/fastcgi-php.conf; | include snippets/fastcgi-php.conf; | ||
} | } | ||
} | |||
</syntaxhighlight> | |||
==SSL Lets Encrypt== | ==SSL Lets Encrypt== | ||
<syntaxhighlight lang="nginx" line="1"> | |||
server { | |||
server_name your-domain.com; | server_name your-domain.com; | ||
| Line 177: | Line 182: | ||
include snippets/fastcgi-php.conf; | include snippets/fastcgi-php.conf; | ||
} | } | ||
} | |||
</syntaxhighlight> | |||
=== Mengatasi search tidak berfungsi<ref>[[mediawikiwiki:Topic:Wgr1qectnr965bmy|mediawiki.org]] - 404 error on rest.php on Mediawiki 1.35.1</ref> === | |||
<syntaxhighlight lang="nginx" line="1"> | |||
location ~ \.php$ { | |||
include fastcgi_params; | |||
# fastcgi_index index.php; | |||
fastcgi_pass php_workers; | |||
# fastcgi_param HTTP_PROXY ''; | |||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||
} | |||
#Ini untuk mengatasinya | |||
location /rest.php { | |||
fastcgi_pass php_workers; | |||
include fastcgi_params; | |||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||
} | |||
</syntaxhighlight> | |||
== Source == | |||
<references /> | |||
[[Category:Server]] | |||
[[Category:Web Server]] | |||
[[Category:Nginx]] | |||
[[Category:MediaWiki]] | |||