Skip to content

Commit ad455d5

Browse files
committed
feat: add nginx manual
1 parent d889313 commit ad455d5

32 files changed

+145
-32
lines changed

view/javascript/components/development.vue

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,100 @@ RewriteCond %{REQUEST_URI} !.*(images|index.php|.html|admin|.js|.css|.png|.jpeg|
7171
RewriteCond %{DOCUMENT_ROOT}/vuefront/$1.html !-f
7272
RewriteRule ^([^?]*) vuefront/200.html [L,QSA]</pre>
7373
</div>
74+
<div
75+
v-if="!information.apache"
76+
id="vf-nginx-configure"
77+
class="development__wrapper"
78+
>
79+
<div
80+
81+
class="development__wrapper_title"
82+
>
83+
{{ $t('textConfigureNginx') }}
84+
</div>
85+
<!-- eslint-disable vue/no-v-html -->
86+
<div
87+
class="development__wrapper_text"
88+
v-html="$t('descriptionConfigureNginx')"
89+
/>
90+
<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+
}
166+
}</pre>
167+
</div>
74168
</div>
75169
</template>
76170
<script>
@@ -104,7 +198,9 @@ export default {
104198
"textConfigureApache": "Configure .htaccess",
105199
"descriptionConfigureApache": "For VueFront Web App to replace your current frontend, you will need to configure your .htaccess. <br>Although we do this automaticly for you, you can still customize it you yourself.<br> <ul> <li>Turn off the VueFront app. Switch the toggle on top of the page to OFF</li> <li>Use your text editor to edit the .htaccess file with the following rules:</li> </ul>",
106200
"buttonCopied": "copied",
107-
"buttonCopy": "copy"
201+
"buttonCopy": "copy",
202+
"textConfigureNginx": "Configure Nginx configuration file",
203+
"descriptionConfigureNginx": "For VueFront Web App to replace your current frontend, you will need to configure your Nginx configuration file. This can only be done manually via your FTP or File Manager. Use your text editor to add the following rules:"
108204
}
109205
</i18n>
110206
<style lang="scss">

view/javascript/components/header.vue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
<b-col>
1313
<b-navbar-nav class="align-items-center vf-header__right_nav">
1414
<header-activation v-if="cms.builds.length > 0 && information.apache" />
15+
<b-button
16+
v-if="cms.builds.length > 0 && !information.apache"
17+
class="vf-header__button_activate"
18+
variant="success"
19+
@click="$scrollTo('#vf-nginx-configure')"
20+
>
21+
{{ $t('button_activate') }}
22+
</b-button>
1523
<header-account />
1624
</b-navbar-nav>
1725
</b-col>
@@ -49,6 +57,15 @@ export default {
4957
@media (min-width: 1920px) {
5058
padding: 0 60px 50px;
5159
}
60+
&__button_activate {
61+
margin-right: 20px;
62+
@media (--phone-and-tablet) {
63+
margin-right: auto;
64+
}
65+
@media (min-width: 1920px) {
66+
margin-right: 40px;
67+
}
68+
}
5269
&__wrapper {
5370
min-height: 63px;
5471
display: flex;
@@ -90,6 +107,7 @@ export default {
90107
</style>
91108
<i18n locale="en">
92109
{
93-
"text_vuefront": "VueFront"
110+
"text_vuefront": "VueFront",
111+
"button_activate": "Activate"
94112
}
95113
</i18n>

view/javascript/components/modal.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<div class="vf-modal-content">
1515
<a
1616
v-if="btnClose"
17-
type="button"
1817
class="vf-modal-close"
1918
@click="cancel"
2019
><font-awesome-icon :icon="['far', 'times']" /></a>

view/javascript/dist/0.06a61eb74669e6b6bc91.bundle.js

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

view/javascript/dist/0.a7c022ea197e328df360.css renamed to view/javascript/dist/0.06a61eb74669e6b6bc91.css

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/dist/0.a7c022ea197e328df360.bundle.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)