Posts

Showing posts from August, 2022

Deploy Nuxt.js app using Apache 2

  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 needed files. If you don't like

Linux: Allow SSH Root Login From Specific IP with password

  Allow ssh root logins   with password   from a single IP address and disable root logins from other IP addresses. To enable root logins via ssh,  PermitRootLogin  keyword has to be set to  yes  in the  /etc/ssh/sshd_config  (OpenSSH daemon configuration) file. To disable root logins,  PermitRootLogin  has to be set to  no  instead. To allow only certain hosts or IP addresses to ssh as the root user, the  Match Address  keyword can be used. The example  vim /etc/ssh/sshd_config : ## Global config PasswordAuthentication no PermitRootLogin without-password ## Okay allow root login with public ssh key for xx.xx.xxx.xxx ## Match Address xx.xx.xxx.xxx,xxx.xxx.xxx.xxx PasswordAuthentication yes PermitRootLogin yes Restart  sshd  service: service sshd restart The arguments to  Match  (docs)  are one or more criteria-pattern pairs or the single token All which matches all criteria. The available criteria are  User ,  Group ,  Host ,  LocalAddress ,  LocalPort ,  RDomain , and  Addr