Run ‘brew doctor’. BUT I GOT SOME WARNINGS:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
Satrias-MacBook-Pro:html teddy$ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: You have the following deprecated, official taps tapped: Homebrew/homebrew-dupes Homebrew/homebrew-php Untap them with `brew untap`. Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and which additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew-provided script of the same name. We found the following "config" scripts: /opt/local/bin/icu-config /opt/local/bin/python2.7-config /opt/local/bin/ncursesw6-config /opt/local/bin/ncurses6-config Warning: You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: python@2 boost composer php@5.6 Warning: Some installed formulae are not readable: php70-xdebug: cannot load such file -- /usr/local/opt/php70-xdebug/Abstract/abstract-php-extension php70-intl: cannot load such file -- /usr/local/opt/php70-intl/Abstract/abstract-php-extension php@5.6: "cxx11" is not a recognized standard php70: cannot load such file -- /usr/local/opt/php70/Abstract/abstract-php php70-mcrypt: cannot load such file -- /usr/local/opt/php70-mcrypt/Abstract/abstract-php-extension |
SOLVE THE WARNINGS
|
1 2 3 4 5 6 |
atrias-MacBook-Pro:html teddy$ brew untap Homebrew/homebrew-dupes Untapping homebrew/dupes... Untapped (32 files, 24.4KB). Satrias-MacBook-Pro:html teddy$ brew untap Homebrew/homebrew-php Untapping homebrew/php... Untapped (40 files, 1MB). |
MODIFY nginx CONFIG IN /usr/local/etc/nginx/nginx.conf:
|
1 |
Satrias-MacBook-Pro:opt teddy$ open -a TextEdit /usr/local/etc/nginx/nginx.conf |
HERE IS THE CONTENT
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
#user _www; worker_processes 1; error_log /usr/local/var/log/nginx/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; access_log /usr/local/var/log/nginx/access.log; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; #root /Library/WebServer/Documents/Projects/; index index.html index.htm index.php; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root html; include fastcgi.conf; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} location /phpmyadmin { root /Library/WebServer/Documents; index index.php; try_files $uri $uri/ /phpmyadmin/index.php$args$is_args; location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; # you may change this to fit your env fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} include servers/*; include /usr/local/etc/nginx/sites-enabled/*; } |
RESTART nginx SERVICE
|
1 |
brew services restart nginx |
CHECK THE CONFIG. BUT I GOT SOME ERROR AND MANAGE TO SOLVE IT
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Satrias-MacBook-Pro:nginx teddy$ nginx -t nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: [emerg] open() "/usr/local/etc/nginx/logs/osclass374.access.log" failed (13: Permission denied) nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed Satrias-MacBook-Pro:nginx teddy$ sudo chmod 777 /usr/local/etc/nginx/logs/osclass374.access.log Password: Satrias-MacBook-Pro:nginx teddy$ nginx -t nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: [emerg] open() "/usr/local/etc/nginx/logs/osclass374.error.log" failed (13: Permission denied) nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed Satrias-MacBook-Pro:nginx teddy$ sudo chmod 777 /usr/local/etc/nginx/logs/osclass374.error.log Satrias-MacBook-Pro:nginx teddy$ nginx -t nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful |