mirror of https://github.com/flarum/flarum
Merge d46426a9a3
into f99aa84034
commit
85d1f901aa
|
@ -30,7 +30,7 @@ server_timezone = "UTC"
|
||||||
# Database Configuration
|
# Database Configuration
|
||||||
mysql_root_password = "root" # We'll assume user "root"
|
mysql_root_password = "root" # We'll assume user "root"
|
||||||
mysql_version = "5.5" # Options: 5.5 | 5.6
|
mysql_version = "5.5" # Options: 5.5 | 5.6
|
||||||
mysql_enable_remote = "false" # remote access enabled when true
|
mysql_enable_remote = "true" # remote access enabled when true
|
||||||
pgsql_root_password = "root" # We'll assume user "root"
|
pgsql_root_password = "root" # We'll assume user "root"
|
||||||
mongo_enable_remote = "false" # remote access enabled when true
|
mongo_enable_remote = "false" # remote access enabled when true
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ composer_packages = [ # List any global Composer packages that you wa
|
||||||
# Default web server document root
|
# Default web server document root
|
||||||
# Symfony's public directory is assumed "web"
|
# Symfony's public directory is assumed "web"
|
||||||
# Laravel's public directory is assumed "public"
|
# Laravel's public directory is assumed "public"
|
||||||
public_folder = "/vagrant"
|
public_folder = "/vagrant/public"
|
||||||
|
|
||||||
laravel_root_folder = "/vagrant/laravel" # Where to install Laravel. Will `composer install` if a composer.json file exists
|
laravel_root_folder = "/vagrant/laravel" # Where to install Laravel. Will `composer install` if a composer.json file exists
|
||||||
laravel_version = "latest-stable" # If you need a specific version of Laravel, set it here
|
laravel_version = "latest-stable" # If you need a specific version of Laravel, set it here
|
||||||
|
@ -105,7 +105,7 @@ Vagrant.configure("2") do |config|
|
||||||
config.vm.synced_folder ".", "/vagrant",
|
config.vm.synced_folder ".", "/vagrant",
|
||||||
id: "core",
|
id: "core",
|
||||||
:nfs => true,
|
:nfs => true,
|
||||||
:mount_options => ['nolock,vers=3,udp,noatime,actimeo=1']
|
:mount_options => ['nolock,vers=3,noatime,actimeo=1']
|
||||||
|
|
||||||
# If using VirtualBox
|
# If using VirtualBox
|
||||||
config.vm.provider :virtualbox do |vb|
|
config.vm.provider :virtualbox do |vb|
|
||||||
|
@ -192,10 +192,10 @@ Vagrant.configure("2") do |config|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
# Provision Apache Base
|
# Provision Apache Base
|
||||||
# config.vm.provision "shell", path: "#{github_url}/scripts/apache.sh", args: [server_ip, public_folder, hostname, github_url]
|
config.vm.provision "shell", path: "#{github_url}/scripts/apache.sh", args: [server_ip, public_folder, hostname, github_url]
|
||||||
|
|
||||||
# Provision Nginx Base
|
# Provision Nginx Base
|
||||||
config.vm.provision "shell", path: "#{github_url}/scripts/nginx.sh", args: [server_ip, public_folder, hostname, github_url]
|
# config.vm.provision "shell", path: "#{github_url}/scripts/nginx.sh", args: [server_ip, public_folder, hostname, github_url]
|
||||||
|
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
# Allow access if Flarum is installed in a subdirectory,
|
||||||
|
# but another .htaccess in a higher directory denies access.
|
||||||
|
|
||||||
|
<IfModule mod_authz_core.c>
|
||||||
|
Require all granted
|
||||||
|
</IfModule>
|
||||||
|
<IfModule !mod_authz_core.c>
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine on
|
||||||
|
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
|
RewriteRule ^vendor/(.*)?$ / [F,L]
|
||||||
|
RewriteRule ^storage/(.*)?$ / [F,L]
|
||||||
|
RewriteRule ^config.php$ / [F,L]
|
||||||
|
|
||||||
|
RewriteRule ^api(.*)$ api.php [QSA,L]
|
||||||
|
RewriteRule ^admin(.*)$ admin.php [QSA,L]
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule !^assets index.php [QSA,L]
|
||||||
|
|
||||||
|
# MultiViews can mess up our rewriting scheme
|
||||||
|
Options -MultiViews
|
||||||
|
|
||||||
|
# Autoindex will list all assets files which is not so good
|
||||||
|
Options -Indexes
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mod_deflate.c>
|
||||||
|
# Compress all output labeled with one of the following MIME-types
|
||||||
|
<IfModule mod_filter.c>
|
||||||
|
AddOutputFilterByType DEFLATE application/atom+xml \
|
||||||
|
application/javascript \
|
||||||
|
application/json \
|
||||||
|
application/vnd.ms-fontobject \
|
||||||
|
application/x-font-ttf \
|
||||||
|
application/x-web-app-manifest+json \
|
||||||
|
application/xhtml+xml \
|
||||||
|
application/xml \
|
||||||
|
font/opentype \
|
||||||
|
image/svg+xml \
|
||||||
|
image/x-icon \
|
||||||
|
text/css \
|
||||||
|
text/html \
|
||||||
|
text/plain \
|
||||||
|
text/xml
|
||||||
|
</IfModule>
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# Configure cache expiry for different file types
|
||||||
|
<IfModule mod_expires.c>
|
||||||
|
ExpiresActive on
|
||||||
|
ExpiresDefault "access plus 1 second"
|
||||||
|
|
||||||
|
ExpiresByType text/css "access plus 1 year"
|
||||||
|
ExpiresByType application/json "access plus 0 seconds"
|
||||||
|
ExpiresByType application/xml "access plus 0 seconds"
|
||||||
|
ExpiresByType text/xml "access plus 0 seconds"
|
||||||
|
ExpiresByType image/x-icon "access plus 1 week"
|
||||||
|
ExpiresByType text/html "access plus 0 seconds"
|
||||||
|
ExpiresByType application/javascript "access plus 1 year"
|
||||||
|
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
|
||||||
|
ExpiresByType text/cache-manifest "access plus 0 seconds"
|
||||||
|
ExpiresByType image/gif "access plus 1 month"
|
||||||
|
ExpiresByType image/jpeg "access plus 1 month"
|
||||||
|
ExpiresByType image/png "access plus 1 month"
|
||||||
|
ExpiresByType application/atom+xml "access plus 1 hour"
|
||||||
|
ExpiresByType application/rss+xml "access plus 1 hour"
|
||||||
|
ExpiresByType application/font-woff2 "access plus 1 month"
|
||||||
|
ExpiresByType application/font-woff "access plus 1 month"
|
||||||
|
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
|
||||||
|
ExpiresByType application/x-font-ttf "access plus 1 month"
|
||||||
|
ExpiresByType font/opentype "access plus 1 month"
|
||||||
|
ExpiresByType image/svg+xml "access plus 1 month"
|
||||||
|
</IfModule>
|
|
@ -9,8 +9,8 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require 'vendor/autoload.php';
|
require '../flarum/vendor/autoload.php';
|
||||||
|
|
||||||
$server = new Flarum\Admin\Server(__DIR__);
|
$server = new Flarum\Admin\Server(__DIR__, __DIR__ . '/../flarum');
|
||||||
|
|
||||||
$server->listen();
|
$server->listen();
|
|
@ -9,8 +9,8 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require 'vendor/autoload.php';
|
require '../flarum/vendor/autoload.php';
|
||||||
|
|
||||||
$server = new Flarum\Api\Server(__DIR__);
|
$server = new Flarum\Api\Server(__DIR__, __DIR__ . '/../flarum');
|
||||||
|
|
||||||
$server->listen();
|
$server->listen();
|
|
@ -9,8 +9,8 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require 'vendor/autoload.php';
|
require '../flarum/vendor/autoload.php';
|
||||||
|
|
||||||
$server = new Flarum\Forum\Server(__DIR__);
|
$server = new Flarum\Forum\Server(__DIR__, __DIR__ . '/../flarum');
|
||||||
|
|
||||||
$server->listen();
|
$server->listen();
|
Loading…
Reference in New Issue