728x90 반응형 php2 MongoDB Security셋팅, 유저생성, Nodejs 연동 + PHP 연동 ( With Ubuntu ) * DB 연동 테스트 - PHP : INSERT - NodeJS : FIND - 인증(authorization)설정 + 관리자 계정 설정 mongo use admin db.createUser({ user: 'root', pwd: '1234', roles: ['userAdminAnyDatabase'] }) # 'userAdminAnyDatabase'를 사용시 모든 DB접근 제어 가능 exit vim /etc/mongod.conf # "security" 주석 해제 후 "authorization: enabled" 추가 security: authorization: enabled :wq! service mongod restart mongo use admin db.auth({"root", "1234"})# 결과가 .. 2021. 7. 9. Nginx에 php, nodejs 같이 쓰기 구성 : nginx php7.2-fpm nodejs vim /etc/nginx/sites-available/default server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html index.php; server_name site; location / { proxy_pass http://127.0.0.1:8080; } # pass PHP scripts to FastCGI server location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/.. 2021. 5. 17. 이전 1 다음 728x90 반응형