server-side/nginx

MAC Bitnami Nginx Stack Bind Error

C/H 2016. 1. 12. 08:30

MAC Nginx Stack 설치 후 가상호스트 설정

/Applications/nginxstack-1.9.9-0/nginx/nginx.conf # 엔진엑스
/Applications/nginxstack-1.9.9-0/nginx/bitnami/bitnami.conf # Bitnami 기본설정
/Applications/nginxstack-1.9.9-0/nginx/bitnami/bitnami-apps-vhosts.conf # Bitnami 가성호스트 설정

server {
	listen       8080;
	server_name  localhost.com;
	access_log  /Applications/nginxstack-1.9.9-0/nginx/logs/com.marsh.access.log;
	error_log  /Applications/nginxstack-1.9.9-0/nginx/logs/com.marsh.error.log notice;

	location / {
		root   /Users/uncaose/workspace/marsh/web;
		index  index.php index.html index.htm;
	}

	include "/Applications/nginxstack-1.9.9-0/nginx/conf/bitnami/phpfastcgi.conf";
	include "/Applications/nginxstack-1.9.9-0/nginx/conf/bitnami/bitnami-apps-prefix.conf";
}

80, 443 포트를 사용할 경우 bind가 되지 않는 오류 발생.

  • Adjust the nginx port to be > 1024, then setup your firewall to redirect traffic from/to port 80 to/from the nginx port;

    1024 이후 포트를 이용하라.

  • Let the launchd run nginx as root and make nginx drop its privileges afterwards by changing the user directive on its configuration file;

    Launchd 를 루트권한으로 실행하고, 구성파일에 권한이 있는 사용자를 지정하라.


반응형