GithubHelp home page GithubHelp logo

bacnd / laravel-nuxtjs-more-easy-to-learn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from quanghung97/laravel-nuxtjs-more-easy-to-learn

0.0 2.0 0.0 989 KB

Nuxt js Laravel Authentication Tutorial With Example

PHP 79.85% Vue 20.15%

laravel-nuxtjs-more-easy-to-learn's Introduction

Mỗi commit là 1 bài học tham khảo dựa trên các nguồn và kinh nghiệm có được

Trong mỗi commit có các phần bình luận phía dưới có thể hướng dẫn 1 chút công việc đã làm ở commit đó

Deploy project

in folder nuxt-client/
npm run build
npm start

on server should install pm2 to run server node forever
npm install -g pm2
pm2 start npm --start

#Apache2

<VirtualHost *:80>
ServerName client.laravelserver.local
DocumentRoot "D:/xampp/htdocs/laravel-shopify-nuxtjs/laravel-shopify-nuxtjs-structure/nuxt-client/.nuxt/dist"
Options -Indexes

ProxyRequests on

ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>

go url http://client.laravelserver.local to test app

Setting https in nuxt

setting file server.key and server.crt in nuxt-client

in file nuxt.config.js

import path from 'path'
import fs from 'fs'

in module.export

server: {
https: {
key: fs.readFileSync(path.resolve(__dirname, 'server.key')),
cert: fs.readFileSync(path.resolve(__dirname, 'server.crt'))
}
}

Now Nuxt run https ssl

Setting https 443 apache

<VirtualHost *:443>
ServerName client.laravelserver.local
ServerAlias www.mydomain.com
DocumentRoot "D:/xampp/htdocs/nuxt-laravel-shopify-jwt/nuxt-client/.nuxt/dist"
Options -Indexes

SSLEngine on
SSLProxyEngine On
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
ProxyRequests on
ProxyPreserveHost On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPass / https://localhost:3000/
ProxyPassReverse / https://localhost:3000/
</VirtualHost>

laravel-nuxtjs-more-easy-to-learn's People

Contributors

quanghung97 avatar

Watchers

James Cloos avatar Nguyễn Đình Bắc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.