-
Notifications
You must be signed in to change notification settings - Fork 0
/
mstp.dev.conf
executable file
·59 lines (54 loc) · 2.09 KB
/
mstp.dev.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<VirtualHost *:80>
ServerName mspt.dev
RewriteEngine on
# the main rewrite rule for the frontend application
RewriteCond %{HTTP_HOST} ^mspt.dev$ [NC]
RewriteCond %{REQUEST_URI} !^/(backend/web|admin|storage/web)
RewriteRule !^/frontend/web /frontend/web%{REQUEST_URI} [L]
# redirect to the page without a trailing slash (uncomment if necessary)
#RewriteCond %{REQUEST_URI} ^/admin/$
#RewriteRule ^(/admin)/ $1 [L,R=301]
# disable the trailing slash redirect
RewriteCond %{REQUEST_URI} ^/admin$
RewriteRule ^/admin /backend/web/index.php [L]
# the main rewrite rule for the backend application
RewriteCond %{REQUEST_URI} ^/admin
RewriteRule ^/admin(.*) /backend/web$1 [L]
DocumentRoot /var/www/mspt/htdocs
<Directory />
Options FollowSymLinks
AllowOverride None
AddDefaultCharset utf-8
</Directory>
<Directory "/var/www/mspt/htdocs/frontend/web">
RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php
Require all granted
</Directory>
<Directory "/var/www/mspt/htdocs/backend/web">
RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php
Require all granted
</Directory>
<Directory "/var/www/mspt/htdocs/storage/web">
RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php
Require all granted
</Directory>
<FilesMatch \.(htaccess|htpasswd|svn|git)>
Require all denied
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/mspt-error.log
</VirtualHost>