Skip to content

Commit e4b97e6

Browse files
committed
fix: fix config for apache and nginx
1 parent 6b0012b commit e4b97e6

30 files changed

+58
-110
lines changed

plugin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,28 +162,28 @@ function VFA_vuefront_admin_action_turn_on() {
162162
# VueFront pages
163163
164164
# VueFront home page
165-
RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico|wp-json|wp-admin|checkout)
165+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
166166
RewriteCond %{QUERY_STRING} !.*(rest_route)
167167
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html -f
168168
RewriteRule ^$ vuefront/index.html [L]
169169
170-
RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico|wp-json|wp-admin|checkout)
170+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
171171
RewriteCond %{QUERY_STRING} !.*(rest_route)
172172
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html !-f
173173
RewriteRule ^$ vuefront/200.html [L]
174174
175175
# VueFront page if exists html file
176176
RewriteCond %{REQUEST_FILENAME} !-f
177177
RewriteCond %{REQUEST_FILENAME} !-d
178-
RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico|wp-json|wp-admin|checkout)
178+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
179179
RewriteCond %{QUERY_STRING} !.*(rest_route)
180180
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html -f
181181
RewriteRule ^([^?]*) vuefront/$1.html [L,QSA]
182182
183183
# VueFront page if not exists html file
184184
RewriteCond %{REQUEST_FILENAME} !-f
185185
RewriteCond %{REQUEST_FILENAME} !-d
186-
RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico|wp-json|wp-admin|checkout)
186+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
187187
RewriteCond %{QUERY_STRING} !.*(rest_route)
188188
RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html !-f
189189
RewriteRule ^([^?]*) vuefront/200.html [L,QSA]";

view/javascript/d_pax/components/development.vue

Lines changed: 26 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,46 @@
4949
<pre>
5050
# VueFront scripts, styles and images
5151
RewriteCond %{REQUEST_URI} .*(_nuxt)
52-
RewriteCond %{REQUEST_URI} !.*vuefront/_nuxt
52+
RewriteCond %{REQUEST_URI} !.*/vuefront/_nuxt
5353
RewriteRule ^([^?]*) vuefront/$1
5454

55+
# VueFront sw.js
56+
RewriteCond %{REQUEST_URI} .*(sw.js)
57+
RewriteCond %{REQUEST_URI} !.*/vuefront/sw.js
58+
RewriteRule ^([^?]*) vuefront/$1
59+
60+
# VueFront favicon.ico
61+
RewriteCond %{REQUEST_URI} .*(favicon.ico)
62+
RewriteCond %{REQUEST_URI} !.*/vuefront/favicon.ico
63+
RewriteRule ^([^?]*) vuefront/$1
64+
65+
5566
# VueFront pages
5667

5768
# VueFront home page
69+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
70+
RewriteCond %{QUERY_STRING} !.*(rest_route)
71+
RewriteCond %{DOCUMENT_ROOT}/vuefront/index.html -f
5872
RewriteRule ^$ vuefront/index.html [L]
5973

74+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
75+
RewriteCond %{QUERY_STRING} !.*(rest_route)
76+
RewriteCond %{DOCUMENT_ROOT}/vuefront/index.html !-f
77+
RewriteRule ^$ vuefront/200.html [L]
78+
6079
# VueFront page if exists html file
6180
RewriteCond %{REQUEST_FILENAME} !-f
6281
RewriteCond %{REQUEST_FILENAME} !-d
63-
RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico)
82+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
83+
RewriteCond %{QUERY_STRING} !.*(rest_route)
6484
RewriteCond %{DOCUMENT_ROOT}/vuefront/$1.html -f
6585
RewriteRule ^([^?]*) vuefront/$1.html [L,QSA]
6686

6787
# VueFront page if not exists html file
6888
RewriteCond %{REQUEST_FILENAME} !-f
6989
RewriteCond %{REQUEST_FILENAME} !-d
70-
RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|.ico)
90+
RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
91+
RewriteCond %{QUERY_STRING} !.*(rest_route)
7192
RewriteCond %{DOCUMENT_ROOT}/vuefront/$1.html !-f
7293
RewriteRule ^([^?]*) vuefront/200.html [L,QSA]</pre>
7394
</div>
@@ -88,81 +109,8 @@ RewriteRule ^([^?]*) vuefront/200.html [L,QSA]</pre>
88109
v-html="$t('descriptionConfigureNginx')"
89110
/>
90111
<pre>
91-
server {
92-
listen 443 ssl http2;
93-
listen [::]:443 ssl http2;
94-
server_name YOUR_DOMAIN; # setup your domain here
95-
96-
# supply SSL certificates here
97-
98-
root /OPENCART_ROOT_FOLDER_PATH/vuefront; #setup your opencart root folder path here following with /vuefront on the end. This will return the VueFront Web App by default.
99-
index index.html index.php;
100-
101-
location / {
102-
try_files $uri $uri/ $uri.html /200.html;
103-
104-
# required to return OpenCart index.php
105-
location /index.php {
106-
root /OPENCART_ROOT_FOLDER_PATH/; #setup your opencart root folder path
107-
index index.php;
108-
109-
location ~ \.php$ {
110-
include snippets/fastcgi-php.conf;
111-
fastcgi_pass unix:/var/run/php/php7.2-fpm-opencart.vuefront.com.sock;
112-
}
113-
}
114-
115-
# required to return OpenCart catalog folder
116-
location /catalog {
117-
root /OPENCART_ROOT_FOLDER_PATH/; #setup your opencart root folder path
118-
index index.php;
119-
120-
location ~* \.(jpg|jpeg|gif|png|ico|pdf|ppt|bmp|rtf|svg|otf|woff|woff2|ttf)$ {
121-
expires max;
122-
add_header Pragma public;
123-
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
124-
}
125-
126-
location ~* \.(js|css|txt)$ {
127-
expires 3d;
128-
add_header Pragma public;
129-
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
130-
}
131-
}
132-
133-
# required to return the OpenCart admin folder
134-
location /admin {
135-
root /OPENCART_ROOT_FOLDER_PATH/; #setup your opencart root folder path
136-
index index.php;
137-
138-
location ~ \.php$ {
139-
include snippets/fastcgi-php.conf;
140-
fastcgi_pass unix:/var/run/php/php7.2-fpm-opencart.vuefront.com.sock;
141-
}
142-
}
143-
# required to return images
144-
location /image {
145-
root /OPENCART_ROOT_FOLDER_PATH/; #setup your opencart root folder path
146-
index index.php;
147-
148-
location ~* \.(jpg|jpeg|gif|png|ico|pdf|ppt|bmp|rtf|svg|otf|woff|woff2|ttf)$ {
149-
expires max;
150-
add_header Pragma public;
151-
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
152-
}
153-
154-
location ~* \.(js|css|txt)$ {
155-
expires 3d;
156-
add_header Pragma public;
157-
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
158-
}
159-
}
160-
161-
#You should have it already since you are running OpenCart on Nginx. But just in case, we supplied this rule below.
162-
location ~ \.php$ {
163-
include snippets/fastcgi-php.conf;
164-
fastcgi_pass unix:/var/run/php/YOUR_PHP_FPM_SOKET.sock; #setup your php-fpm socket
165-
}
112+
location ~ ^((?!image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/).)*$ {
113+
try_files /vuefront/$uri /vuefront/$uri "/vuefront${uri}index.html" /vuefront$uri.html /vuefront/200.html;
166114
}</pre>
167115
</div>
168116
</div>

view/javascript/d_vuefront/0.e6da08e4c2cba367991f.bundle.js renamed to view/javascript/d_vuefront/0.c52553d8b74542c19fe6.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

view/javascript/d_vuefront/manifest.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,134 +53,134 @@
5353
"id": 0,
5454
"next": null,
5555
"js": [
56-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/0.e6da08e4c2cba367991f.bundle.js"
56+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/0.c52553d8b74542c19fe6.bundle.js"
5757
],
5858
"css": [
59-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/0.e6da08e4c2cba367991f.css"
59+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/0.c52553d8b74542c19fe6.css"
6060
]
6161
},
6262
"js": [
63-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/17.e6da08e4c2cba367991f.bundle.js"
63+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/17.c52553d8b74542c19fe6.bundle.js"
6464
],
6565
"css": []
6666
},
6767
"js": [
68-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/2.e6da08e4c2cba367991f.bundle.js"
68+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/2.c52553d8b74542c19fe6.bundle.js"
6969
],
7070
"css": []
7171
},
7272
"js": [
73-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/23.e6da08e4c2cba367991f.bundle.js"
73+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/23.c52553d8b74542c19fe6.bundle.js"
7474
],
7575
"css": []
7676
},
7777
"js": [
78-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/16.e6da08e4c2cba367991f.bundle.js"
78+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/16.c52553d8b74542c19fe6.bundle.js"
7979
],
8080
"css": []
8181
},
8282
"js": [
83-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/25.e6da08e4c2cba367991f.bundle.js"
83+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/25.c52553d8b74542c19fe6.bundle.js"
8484
],
8585
"css": []
8686
},
8787
"js": [
88-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/20.e6da08e4c2cba367991f.bundle.js"
88+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/20.c52553d8b74542c19fe6.bundle.js"
8989
],
9090
"css": []
9191
},
9292
"js": [
93-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/14.e6da08e4c2cba367991f.bundle.js"
93+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/14.c52553d8b74542c19fe6.bundle.js"
9494
],
9595
"css": []
9696
},
9797
"js": [
98-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/3.e6da08e4c2cba367991f.bundle.js"
98+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/3.c52553d8b74542c19fe6.bundle.js"
9999
],
100100
"css": []
101101
},
102102
"js": [
103-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/6.e6da08e4c2cba367991f.bundle.js"
103+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/6.c52553d8b74542c19fe6.bundle.js"
104104
],
105105
"css": []
106106
},
107107
"js": [
108-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/5.e6da08e4c2cba367991f.bundle.js"
108+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/5.c52553d8b74542c19fe6.bundle.js"
109109
],
110110
"css": []
111111
},
112112
"js": [
113-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/24.e6da08e4c2cba367991f.bundle.js"
113+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/24.c52553d8b74542c19fe6.bundle.js"
114114
],
115115
"css": []
116116
},
117117
"js": [
118-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/13.e6da08e4c2cba367991f.bundle.js"
118+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/13.c52553d8b74542c19fe6.bundle.js"
119119
],
120120
"css": []
121121
},
122122
"js": [
123-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/15.e6da08e4c2cba367991f.bundle.js"
123+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/15.c52553d8b74542c19fe6.bundle.js"
124124
],
125125
"css": []
126126
},
127127
"js": [
128-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/11.e6da08e4c2cba367991f.bundle.js"
128+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/11.c52553d8b74542c19fe6.bundle.js"
129129
],
130130
"css": []
131131
},
132132
"js": [
133-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/22.e6da08e4c2cba367991f.bundle.js"
133+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/22.c52553d8b74542c19fe6.bundle.js"
134134
],
135135
"css": []
136136
},
137137
"js": [
138-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/19.e6da08e4c2cba367991f.bundle.js"
138+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/19.c52553d8b74542c19fe6.bundle.js"
139139
],
140140
"css": []
141141
},
142142
"js": [
143-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/10.e6da08e4c2cba367991f.bundle.js"
143+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/10.c52553d8b74542c19fe6.bundle.js"
144144
],
145145
"css": []
146146
},
147147
"js": [
148-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/18.e6da08e4c2cba367991f.bundle.js"
148+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/18.c52553d8b74542c19fe6.bundle.js"
149149
],
150150
"css": []
151151
},
152152
"js": [
153-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/9.e6da08e4c2cba367991f.bundle.js"
153+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/9.c52553d8b74542c19fe6.bundle.js"
154154
],
155155
"css": []
156156
},
157157
"js": [
158-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/21.e6da08e4c2cba367991f.bundle.js"
158+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/21.c52553d8b74542c19fe6.bundle.js"
159159
],
160160
"css": []
161161
},
162162
"js": [
163-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/7.e6da08e4c2cba367991f.bundle.js"
163+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/7.c52553d8b74542c19fe6.bundle.js"
164164
],
165165
"css": []
166166
},
167167
"js": [
168-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/4.e6da08e4c2cba367991f.bundle.js"
168+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/4.c52553d8b74542c19fe6.bundle.js"
169169
],
170170
"css": []
171171
},
172172
"js": [
173-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/8.e6da08e4c2cba367991f.bundle.js"
173+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/8.c52553d8b74542c19fe6.bundle.js"
174174
],
175175
"css": []
176176
},
177177
"js": [
178-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/12.e6da08e4c2cba367991f.bundle.js"
178+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/12.c52553d8b74542c19fe6.bundle.js"
179179
],
180180
"css": []
181181
},
182182
"js": [
183-
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/e6da08e4c2cba367991f.bundle.js"
183+
"/wp-content/plugins/vuefront/view/javascript/d_vuefront/c52553d8b74542c19fe6.bundle.js"
184184
],
185185
"css": []
186186
}

0 commit comments

Comments
 (0)