Installing the Certbot Let’s Encrypt Client The certbot package is not available through the package manager by default. You will need to enable the EPEL repository to install Certbot. sudo yum install epel-release sudo yum install certbot-nginx Set Up NGINX certbot can automatically configure NGINX for SSL/TLS. It looks for and modifies the server block in your NGINX configuration that contains a server_name directive with the domain name you’re requesting a certificate for. In our example, the domain is www.mydomain.com . Assuming you’re starting with a fresh NGINX install, use a text editor to create a file in the /etc/nginx/conf.d directory named domain_name.conf (so in our example, www.mydomain.com.conf). Specify your domain name (and variants, if any) with the server_name directive: server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; server_name myd...
Deploy your dynamic Nuxt.js app Nuxt.js is an amazing server side rendering application framework for Vue.js. In this article we will see how to deploy Nuxt.js application to AWS instance in universal app mode. Where in Nuxt.js you can choose between Universal, Static Generated or Single Page application. Before we start deploying our dynamic app, if you want just to deploy a static website, you can run this command: npm run generate and it will generate the files and put them in dist folder which you can upload to any server you want. But this will not work for universal apps. 1. Build your app To build a ssr app you need to run the following command: npm run build The generated files will not be in the dist folder as for the static app, but you can find all generated files in .nuxt folder which will be the entry point. 2. Upload to the server There are two ways to do this upload your whole application with the source code or just upload the n...
Create The Postgres Password File The file .pgpass in a user’s home directory can contain passwords to be used if the connection requires a password (and no password has been specified otherwise). On Microsoft Windows the file is named %APPDATA%\postgresql\pgpass.conf (where %APPDATA% refers to the Application Data subdirectory in the user’s profile). Alternatively, the password file to use can be specified using the connection parameter passfile or the environment variable PGPASSFILE . Let’s see if the postgres user already has a password: sudo -u postgres psql select * from pg_authid; If rolpassword is empty, set the password: ALTER USER postgres PASSWORD 'mypassword'; \q Create .pgpass vim ~/.pgpass # Add the following line # hostname:port:database:username:password localhost:*:*:postgres:[password] Add Environment variable PGPASSFILE export PGPASSFILE= '/root/.pgpass' vim /etc/environment ...
Comments
Post a Comment