「Tabetainet」の版間の差分
提供: wikipokpok
10行目: | 10行目: | ||
node app.js</nowiki> | node app.js</nowiki> | ||
+ | |||
+ | <nowiki><VirtualHost _default_:443> | ||
+ | ServerAdmin webmaster@localhost | ||
+ | DocumentRoot /var/www/html | ||
+ | |||
+ | ErrorLog ${APACHE_LOG_DIR}/error.log | ||
+ | CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
+ | |||
+ | SSLEngine on | ||
+ | SSLCertificateFile /path/to/your/ssl_certificate.crt | ||
+ | SSLCertificateKeyFile /path/to/your/ssl_certificate_private.key | ||
+ | |||
+ | # プロキシ設定 | ||
+ | ProxyPreserveHost On | ||
+ | ProxyPass / http://localhost:3000/ | ||
+ | ProxyPassReverse / http://localhost:3000/ | ||
+ | </VirtualHost> | ||
+ | </nowiki> | ||
% npm install passport passport-google-oauth | % npm install passport passport-google-oauth |
2023年7月22日 (土) 17:18時点における版
# Node.js v18をインストール curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs cd /path/to/your/app npm install --production node app.js
<VirtualHost _default_:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on SSLCertificateFile /path/to/your/ssl_certificate.crt SSLCertificateKeyFile /path/to/your/ssl_certificate_private.key # プロキシ設定 ProxyPreserveHost On ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ </VirtualHost>
% npm install passport passport-google-oauth
% npm install dotenv
% npm install express-session