跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
MalacoKnowledge
搜索
搜索
登录
个人工具
登录
查看“MediaWiki”的源代码
页面
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
←
MediaWiki
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 安装 == # pacman -S mediawiki == PHP 配置 == # pacman -S php7-fpm <code>/etc/php7/php.ini</code> 中的 ;extension=iconv 去掉 <code>;</code> 如果使用 <code>mariadb</code> 对下述使用一样的方法处理 ;extension=mysqli ;extension=pdo_mysql = MariaDB 配置 = # pacman -S mariadb 根据 [[MariaDB]] 创建数据库。 == Nginx 配置 == 替换 <code>DOMAIN</code> 以及 <code>/var/run/php-fpm7/php-fpm.sock</code> 根据自己的 <code>php-fpm</code> 版本,这里使用 <code>php-fpm7</code> server { listen 80; server_name DOMAIN; return 301 <nowiki>https://$server_name$request_uri</nowiki>; } server { listen 443 ssl http2; server_name DOMAIN; root /usr/share/webapps/mediawiki; ssl_certificate /etc/letsencrypt/live/DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/DOMAIN/privkey.pem; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_prefer_server_ciphers on; access_log /var/log/nginx/mediawiki_access.log; location / { index index.php; try_files $uri $uri/ @mediawiki; } location @mediawiki { rewrite ^/(.*)$ /index.php; } location ~ \.php$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php-fpm7/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; try_files $uri @mediawiki; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { try_files $uri /index.php; expires max; log_not_found off; } # Restrictions based on the .htaccess files location ~ ^/(cache|includes|maintenance|languages|serialized|tests|images/deleted)/ { deny all; } location ~ ^/(bin|docs|extensions|includes|maintenance|mw-config|resources|serialized|tests)/ { internal; } location ^~ /images/ { try_files $uri /index.php; } location ~ /\. { access_log off; log_not_found off; deny all; } location /rest.php { try_files $uri $uri/ /rest.php?$args; } } == 美化 == 编辑 <code>/usr/share/webapps/mediawiki/LocalSettings.php</code> $wgLogos = [ '1x' => "$wgResourceBasePath/logo.png" ]; $wgLogo = "$wgResourceBasePath/logo.png"; $wgFavicon = "$wgResourceBasePath/favicon.ico"; listen 80; server_name knwl.malacology.net; return 301 <nowiki>https://$server_name$request_uri</nowiki>; } server { listen 443 ssl http2; server_name knwl.malacology.net; root /usr/share/webapps/mediawiki; ssl_certificate /etc/letsencrypt/live/malacology.net/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/malacology.net/privkey.pem; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_prefer_server_ciphers on; access_log /var/log/nginx/mediawiki_access.log; location / { index index.php; try_files $uri $uri/ @mediawiki; } location @mediawiki { rewrite ^/(.*)$ /index.php; } location ~ \.php$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php-fpm7/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; try_files $uri @mediawiki; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { try_files $uri /index.php; expires max; log_not_found off; } # Restrictions based on the .htaccess files location ~ ^/(cache|includes|maintenance|languages|serialized|tests|images/deleted)/ { deny all; } location ~ ^/(bin|docs|extensions|includes|maintenance|mw-config|resources|serialized|tests)/ { internal; } location ^~ /images/ { try_files $uri /index.php; } location ~ /\. { access_log off; log_not_found off; deny all; } location /rest.php { try_files $uri $uri/ /rest.php?$args; } }
返回
MediaWiki
。
开关有限宽度模式