When creating a new website on your FlashVPS server, many configuration options are available to you:
/public
.Tạo trang web
Once the website has been created in FlashVPS, you can install an application or project. Projects contain the actual source code of your application. FlashVPS can install three types of applications: Git Repository, WordPress or phpMyAdmin. Install the source code at the site's management console
! Source Control Provider
Before you can install a Git repository, you must first make sure that you have connected your source control provider to your FlashVPS account.
Once you've connected your source control vendor accounts, you can choose a provider from one of the available options. Steps to install the source code for the website:
Choose a supplierGit
Select the Source Install Options (Custom Git | Github | Gitlab) If you choose Custom Git
you will need to add the SSH FlashVPS key to the provider manually.
Enter the repository name. For the repository name you should provide the full SSH URL, e.g. [email protected]:flashvps/flashvps.git
.
Enter Branch Name
Option to run Composer installation > Select Install Git Repository
Steps to install Wordpress :
Wordpress
Cài đặt Wordpress
After the installation is complete. You can go to your website domain and continue installing WordPress from the browser.
! WordPress Security
You should continue to install WordPress as soon as FlashVPS has installed it for you, so that it is safe with your username and password. You can also choose to create a new Security Rule before installing WordPress so that your installation is password protected.
Steps to install phpMyAdmin source code :
Cài đặt phpMyAdmin
Once FlashVPS has phpMyAdmin installed, you can then log into your installation using any combination of your database username and password.
When you are ready to convert your app to an official domain name, you can easily Create a website with your domain name.
Below is an example of the default Nginx site configuration used by FlashVPS.
server { listen 80; listen [::]:80; server_name www.your-domain.com; if ($http_x_forwarded_proto = 'https') { return 301 https://your-domain.com$request_uri; } return 301 $scheme://your-domain.com$request_uri; } server{ listen 80; listen [::]:80; server_name your-domain.com; server_tokens off; root /home/flashvps/your-domain.com; # ssl_certificate ### # ssl_certificate_key ### # https://ssl-config.mozilla.org/ # Ubuntu 20.04 UP ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers XXXXXX; ssl_prefer_server_ciphers off; ssl_dhparam /etc/nginx/dhparams.pem; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff"; index index.html index.htm index.php; charset utf-8; # USER CUSTOM CONFIG (CAN MOVE, DO NOT REMOVE!) location ^~ /.well-known/acme-challenge { auth_basic off; allow all; alias /home/flashvps/.letsencrypt; } location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } access_log off; error_log /var/log/nginx/your-domain.com-error.log error; error_page 404 /index.php; location ~ \.php$ { try_files $uri $uri/ =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_index index.php; include fastcgi_params; } # Deny files starting with a . (dot) except .well-known location ~ /\.(?!well-known).* { deny all; } # WordPress: Add a slash at the end of request */wp-admin rewrite /wp-admin$ $scheme://$host$uri/ permanent; # WordPress: deny general stuff location ~* ^/(?:xmlrpc\.php|wp-links-opml\.php|wp-config\.php|wp-config-sample\.php|readme\.html|license\.txt)$ { deny all; } location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|eot|svg|ttf|woff|woff2)$ { gzip_static off; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; expires 30d; break; } location ~* \.(txt|js|css)$ { add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; expires 30d; break; } }
If your server has multiple versions of PHP installed, you can switch the version your website uses at any time using Site {domain_name}
the website's tab in the FlashVPS dashboard.
When switching the version your website is using, you should make sure that your server has the full PHP extension/module installed for that version. Failure to install additional modules may make your site unresponsive.
You will also need to update your site's deployment script to reload the correct PHP-FPM version and call the correct PHP version when running any PHP commands. Update the deployment script in the Site's management console.