The Basics
Sites

The Basics

  • 2023-01-22 11:53:53

Create a website

When creating a new website on your FlashVPS server, many configuration options are available to you:

  • Server : The server on which the website will be created.
  • Domain Name : The domain name for the website.
  • Aliases : Aliases for the site (optional)
  • Project Type : This option indicates whether the installed project for your website will be a PHP/Laravel project or a static HTML page. This setting is used to define the structure of the Nginx configuration file generated for your sitefn.
  • Web Directory : Directory that is publicly accessible over the Internet. For Laravel applications, this is usually the /public.
  • PHP Version : If you have multiple versions of PHP installed on your server, you can choose which version will be used to serve the website.
  • Enable subdomain wildcard : Subdomain wildcard allows you to set destinations for all subdomains that do not exist about the current website.
  • Site Isolation : This configuration setting indicates whether the PHP-FPM process should run under its own user account. You can learn more about site isolation by consulting the full documentation on this feature .
  • Create Database : This setting indicates whether you want to create a new database for your site.
  1. Create a website The Basics 0 The Basics 1
  2. Enter information > SelectTạo trang web

Apps / Projects

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 consoleThe Basics 2 The Basics 3

Git Repository

! 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:

  1. Choose a supplierGit The Basics 4

  2. Select the Source Install Options (Custom Git | Github | Gitlab) If you choose Custom Gityou will need to add the SSH FlashVPS key to the provider manually.The Basics 5

  3. Enter the repository name. For the repository name you should provide the full SSH URL, e.g. [email protected]:flashvps/flashvps.git.

  4. Enter Branch Name

  5. Option to run Composer installation > Select Install Git Repository

WordPress

Steps to install Wordpress :

  1. Choose the option to install the source codeWordpress The Basics 6
  2. The database and database user fields can be left blank. FlashVPS will create it automatically for you. Or Create a database if not already there.
  3. SelectCà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.

phpMyAdmin

Steps to install phpMyAdmin source code :

  1. Select phpMyAdmin source code installation optionThe Basics 7
  2. SelectCài đặt phpMyAdmin

Once FlashVPS has phpMyAdmin installed, you can then log into your installation using any combination of your database username and password.

Default website

The Basics 8

When you are ready to convert your app to an official domain name, you can easily Create a website with your domain name.

Default Nginx Template

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;     }      } 

PHP Version

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.The Basics 9

Switching PHP Versions for Websites

The Basics 10When 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.

The Basics 11

Author FlashPanel Admin
FlashPanel Admin
Joined in 3 years ago