add(): custom flarum vhost
parent
8023c2b1f6
commit
1fc5449a7e
|
@ -50,6 +50,6 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.8/community" >> /etc/a
|
|||
|
||||
COPY rootfs /
|
||||
RUN chmod +x /usr/local/bin/* /services/*/run /services/.s6-svscan/*
|
||||
VOLUME /flarum/app/assets /flarum/app/extensions
|
||||
VOLUME /flarum/app/assets /flarum/app/extensions /etc/nginx/conf.d
|
||||
EXPOSE 8888
|
||||
CMD ["run.sh"]
|
||||
|
|
|
@ -26,6 +26,7 @@ Flarum is the next-generation forum software that makes online discussion fun. I
|
|||
|
||||
- **/flarum/app/assets** : Flarum assets directory
|
||||
- **/flarum/app/extensions** : Flarum extension directory
|
||||
- **/etc/nginx/conf.d** : Nginx location directory
|
||||
|
||||
### Environment variables
|
||||
|
||||
|
@ -72,6 +73,7 @@ services:
|
|||
volumes:
|
||||
- /mnt/docker/flarum/assets:/flarum/app/assets
|
||||
- /mnt/docker/flarum/extensions:/flarum/app/extensions
|
||||
- /mnt/docker/flarum/nginx:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- mariadb
|
||||
|
||||
|
@ -169,5 +171,3 @@ my_public_repo|{"type":"vcs","url":"https://github.com/my/repo"}
|
|||
```
|
||||
|
||||
https://getcomposer.org/doc/03-cli.md#modifying-repositories
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# Example:
|
||||
# fix for flagrow/sitemap (https://github.com/flagrow/sitemap)
|
||||
# location = /sitemap.xml { try_files $uri $uri/ /index.php?$query_string; }
|
|
@ -67,18 +67,15 @@ http {
|
|||
error_page 500 /500.html;
|
||||
error_page 503 /503.html;
|
||||
|
||||
location = /403.html { root /flarum/app/vendor/flarum/core/error; }
|
||||
location = /404.html { root /flarum/app/vendor/flarum/core/error; }
|
||||
location = /500.html { root /flarum/app/vendor/flarum/core/error; }
|
||||
location = /503.html { root /flarum/app/vendor/flarum/core/error; }
|
||||
location = /403.html { alias /flarum/app/vendor/flarum/core/error; }
|
||||
location = /404.html { alias /flarum/app/vendor/flarum/core/error; }
|
||||
location = /500.html { alias /flarum/app/vendor/flarum/core/error; }
|
||||
location = /503.html { alias /flarum/app/vendor/flarum/core/error; }
|
||||
|
||||
location / { try_files $uri $uri/ /index.php?$query_string; }
|
||||
location /api { try_files $uri $uri/ /api.php?$query_string; }
|
||||
location /admin { try_files $uri $uri/ /admin.php?$query_string; }
|
||||
|
||||
# fix for flagrow/sitemap (https://github.com/flagrow/sitemap)
|
||||
location = /sitemap.xml { try_files $uri $uri/ /index.php?$query_string; }
|
||||
|
||||
# Access path list
|
||||
# --------------------------------------
|
||||
location ~ /\. {
|
||||
|
@ -125,16 +122,18 @@ http {
|
|||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_request_buffering off;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_param REMOTE_ADDR $http_x_real_ip;
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/custom-flarum.conf
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue