cretueusebiu / laravel-nuxt

A Laravel-Nuxt starter kit.
https://laravel-nuxt.cretueusebiu.com
MIT License
1.15k stars 262 forks source link

how to deploy to hosting #159

Closed menphurk236 closed 11 months ago

menphurk236 commented 1 year ago

how to deploy to hosting with directadmin ftp

maprangsoft commented 1 year ago

if hosting can't use command in local pc or mac

  1. edit APP_URL in .env use url your production
  2. npm run build
  3. create .htaccess file in root
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ ^$1 [N]

    RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
    RewriteRule ^(.*)$ public/$1 

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ server.php

</IfModule>
  1. zip folder upload to ftp and extract zip to your target
  2. test access http://your url