When using all the functions "Add website to VPS", you should pay attention:
+ VPSSIM support both WWW and Non_WWW domains, so if you want to use the domain form, add that form to VPS. VPSSIM auto config redirect to non_www to www or non_www to www belong to the domain form you added to VPS.
+ VPSSIM does not support sub-domain for domain and also cannot do this. To create sub-domain for domain, you must point sub-domain to the VPS's IP and use the function Add Website to VPS to add domain into VPS.
+ After upload code to /home/domain.com/public_html, you should run the function Fix Error Chmod, chown (VPSSIM Menu ==> Add Website & Code ==> Fix Error Chmod, chown ) to set owner for all the code. If you do not do this, maybe website has error when running.
If you do not want to use the above function, you can use this command to do:
The vhost (virtual host) of the domain in /etc/nginx/conf.d/domain.com.conf
+ You can customize the error 402, 403, 502 .... by following these steps:
- Edit content all files in /home/domain.com/errorpage_html . Do not change the name of all files.
- Edit vhost /etc/nginx/conf.d/domain.com.conf
Change:
+ VPSSIM support both WWW and Non_WWW domains, so if you want to use the domain form, add that form to VPS. VPSSIM auto config redirect to non_www to www or non_www to www belong to the domain form you added to VPS.
+ VPSSIM does not support sub-domain for domain and also cannot do this. To create sub-domain for domain, you must point sub-domain to the VPS's IP and use the function Add Website to VPS to add domain into VPS.
+ After upload code to /home/domain.com/public_html, you should run the function Fix Error Chmod, chown (VPSSIM Menu ==> Add Website & Code ==> Fix Error Chmod, chown ) to set owner for all the code. If you do not do this, maybe website has error when running.
If you do not want to use the above function, you can use this command to do:
Code: Select all
+ Do not like Apache webserver using .htacess, VPSSIM running with Nginx webserver, so belong to the code you use, you should config vhost right for it.chown -R nginx:nginx /home/doman.com/public_html
The vhost (virtual host) of the domain in /etc/nginx/conf.d/domain.com.conf
+ You can customize the error 402, 403, 502 .... by following these steps:
- Edit content all files in /home/domain.com/errorpage_html . Do not change the name of all files.
- Edit vhost /etc/nginx/conf.d/domain.com.conf
Change:
Code: Select all
To:# Error Page
#error_page 403 /errorpage_html/403.html;
#error_page 404 /errorpage_html/404.html;
#error_page 405 /errorpage_html/405.html;
#error_page 502 /errorpage_html/502.html;
#error_page 503 /errorpage_html/503.html;
#error_page 504 /errorpage_html/504.html;
#location ^~ /errorpage_html/ {
# internal;
# root /home/domain.com;
# access_log off;
#}
Code: Select all
Check Nginx:# Error Page
error_page 403 /errorpage_html/403.html;
error_page 404 /errorpage_html/404.html;
error_page 405 /errorpage_html/405.html;
error_page 502 /errorpage_html/502.html;
error_page 503 /errorpage_html/503.html;
error_page 504 /errorpage_html/504.html;
location ^~ /errorpage_html/ {
internal;
root /home/domain.com;
access_log off;
}
Code: Select all
If it okay:nginx -t
Code: Select all
Khởi động lại Nginx để thay đổi có hiệu lực:nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Code: Select all
service nginx restart
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)