<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: hadezuka</title>
    <description>The latest articles on DEV Community by hadezuka (@dzulqurnain).</description>
    <link>https://dev.to/dzulqurnain</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F703036%2F696059ae-3309-46b3-9b8c-041abbfc04d7.png</url>
      <title>DEV Community: hadezuka</title>
      <link>https://dev.to/dzulqurnain</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dzulqurnain"/>
    <language>en</language>
    <item>
      <title>Deploying NUXT SSR to CPanel</title>
      <dc:creator>hadezuka</dc:creator>
      <pubDate>Fri, 10 Sep 2021 17:14:27 +0000</pubDate>
      <link>https://dev.to/dzulqurnain/deploying-nuxt-ssr-to-cpanel-j7g</link>
      <guid>https://dev.to/dzulqurnain/deploying-nuxt-ssr-to-cpanel-j7g</guid>
      <description>&lt;p&gt;Sharing this because maybe there are many people like me who struggling how to deploy nuxt ssr to cpanel.so, here is the steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Create basic node app on cpanel&lt;/strong&gt;&lt;br&gt;
first, create &lt;a href="https://hadezuka.dev/category/koding/nodejs/" rel="noopener noreferrer"&gt;node&lt;/a&gt; app on cpanel. You can find it on &lt;br&gt;
&lt;code&gt;Software - Setup Node.js App&lt;/code&gt; then fill the input like follows:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj0nkw5gvjc80fsrghzoq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj0nkw5gvjc80fsrghzoq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Upload your nuxt project&lt;/strong&gt;&lt;br&gt;
after creating the app, next step is upload your nuxt project into your folder that you've been specified on step 1. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Setting up&lt;/strong&gt;&lt;br&gt;
you can either using ssh or terminal. here i am using terminal on cpanel. to do so, copy the command from  &lt;code&gt;Enter to the virtual environment&lt;/code&gt;. Then go to &lt;code&gt;cpanel dashboard -&amp;gt; terminal&lt;/code&gt;.&lt;br&gt;
paste that command there, and execute the following commands:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;npm run install&lt;/code&gt; to install all your deps&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm run build&lt;/code&gt; you can skip if you're already build it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm install pm2&lt;/code&gt; to install pm2 process manager&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npx pm2 start npm --name "nuxtjs" --interpreter bash -- start&lt;/code&gt; to run the "nuxtjs" app using pm2. "nuxtjs" is your app name.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;4. Setting the .htaccess&lt;/strong&gt;&lt;br&gt;
after that, now you need to add this code to your .htaccess on public_html if it's not subdomain, or on the specified folder if subdomain:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

Options +FollowSymLinks -Indexes 

IndexIgnore * 

 DirectoryIndex 
 &amp;lt;IfModule mod_rewrite.c&amp;gt; 
 RewriteEngine on 
 RewriteRule ^(.*)$ http://localhost:&amp;lt;your Port&amp;gt;/$1 [P] 
 &amp;lt;/IfModule&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;change your port with the actual port that your app use.&lt;/p&gt;

&lt;p&gt;Done!&lt;br&gt;
sorry if my explanation not that good. But I hope you get what I mean.&lt;/p&gt;

&lt;p&gt;More of my &lt;a href="https://hadezuka.dev/" rel="noopener noreferrer"&gt;articles&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>nuxt</category>
      <category>cpanel</category>
      <category>node</category>
    </item>
  </channel>
</rss>
