{"id":4404,"date":"2019-07-29T02:15:55","date_gmt":"2019-07-29T02:15:55","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=4404"},"modified":"2019-07-29T02:46:35","modified_gmt":"2019-07-29T02:46:35","slug":"macos-mojave-nginx","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/07\/29\/macos-mojave-nginx\/","title":{"rendered":"MacOS Mojave Nginx"},"content":{"rendered":"<p>Run &#8216;brew doctor&#8217;. BUT I GOT SOME WARNINGS:<\/p>\n<pre class=\"lang:default decode:true\">Satrias-MacBook-Pro:html teddy$ brew doctor\r\nPlease note that these warnings are just used to help the Homebrew maintainers\r\nwith debugging if you file an issue. If everything you use Homebrew for is\r\nworking fine: please don't worry or file an issue; just ignore this. Thanks!\r\n\r\nWarning: You have the following deprecated, official taps tapped:\r\n  Homebrew\/homebrew-dupes\r\n  Homebrew\/homebrew-php\r\nUntap them with `brew untap`.\r\n\r\nWarning: \"config\" scripts exist outside your system or Homebrew directories.\r\n`.\/configure` scripts often look for *-config scripts to determine if\r\nsoftware packages are installed, and which additional flags to use when\r\ncompiling and linking.\r\n\r\nHaving additional scripts in your path can confuse software installed via\r\nHomebrew if the config script overrides a system or Homebrew-provided\r\nscript of the same name. We found the following \"config\" scripts:\r\n  \/opt\/local\/bin\/icu-config\r\n  \/opt\/local\/bin\/python2.7-config\r\n  \/opt\/local\/bin\/ncursesw6-config\r\n  \/opt\/local\/bin\/ncurses6-config\r\n\r\nWarning: You have unlinked kegs in your Cellar.\r\nLeaving kegs unlinked can lead to build-trouble and cause brews that depend on\r\nthose kegs to fail to run properly once built. Run `brew link` on these:\r\n  python@2\r\n  boost\r\n  composer\r\n  php@5.6\r\n\r\nWarning: Some installed formulae are not readable:\r\n  php70-xdebug: cannot load such file -- \/usr\/local\/opt\/php70-xdebug\/Abstract\/abstract-php-extension\r\n\r\n  php70-intl: cannot load such file -- \/usr\/local\/opt\/php70-intl\/Abstract\/abstract-php-extension\r\n\r\n  php@5.6: \"cxx11\" is not a recognized standard\r\n\r\n  php70: cannot load such file -- \/usr\/local\/opt\/php70\/Abstract\/abstract-php\r\n\r\n  php70-mcrypt: cannot load such file -- \/usr\/local\/opt\/php70-mcrypt\/Abstract\/abstract-php-extension<\/pre>\n<p>SOLVE THE WARNINGS<\/p>\n<pre class=\"lang:default decode:true \">atrias-MacBook-Pro:html teddy$ brew untap Homebrew\/homebrew-dupes\r\nUntapping homebrew\/dupes...\r\nUntapped (32 files, 24.4KB).\r\nSatrias-MacBook-Pro:html teddy$ brew untap Homebrew\/homebrew-php\r\nUntapping homebrew\/php...\r\nUntapped (40 files, 1MB).<\/pre>\n<p>MODIFY nginx CONFIG IN \/usr\/local\/etc\/nginx\/nginx.conf:<\/p>\n<pre class=\"lang:default decode:true \">Satrias-MacBook-Pro:opt teddy$ open -a TextEdit \/usr\/local\/etc\/nginx\/nginx.conf<\/pre>\n<p>HERE IS THE CONTENT<\/p>\n<pre class=\"lang:default decode:true \">#user  _www;\r\nworker_processes  1;\r\n\r\nerror_log   \/usr\/local\/var\/log\/nginx\/error.log;\r\n#error_log  logs\/error.log  notice;\r\n#error_log  logs\/error.log  info;\r\n\r\n#pid        logs\/nginx.pid;\r\n\r\n\r\nevents {\r\n    worker_connections  1024;\r\n}\r\n\r\n\r\nhttp {\r\n    include       mime.types;\r\n    default_type  application\/octet-stream;\r\n\r\n    #log_format  main  '$remote_addr - $remote_user [$time_local] \"$request\" '\r\n    #                  '$status $body_bytes_sent \"$http_referer\" '\r\n    #                  '\"$http_user_agent\" \"$http_x_forwarded_for\"';\r\n\r\n    #access_log  logs\/access.log  main;\r\n    access_log   \/usr\/local\/var\/log\/nginx\/access.log;\r\n\r\n    sendfile        on;\r\n    #tcp_nopush     on;\r\n\r\n    #keepalive_timeout  0;\r\n    keepalive_timeout  65;\r\n\r\n    #gzip  on;\r\n\r\n    server {\r\n        listen       80;\r\n        server_name  localhost;\r\n\r\n        #charset koi8-r;\r\n\r\n        #access_log  logs\/host.access.log  main;\r\n\r\n        location \/ {\r\n            root   html;\r\n            #root   \/Library\/WebServer\/Documents\/Projects\/;\r\n            index  index.html index.htm index.php;\r\n        }\r\n\r\n        #error_page  404              \/404.html;\r\n\r\n        # redirect server error pages to the static page \/50x.html\r\n        #\r\n        error_page   500 502 503 504  \/50x.html;\r\n        location = \/50x.html {\r\n            root   html;\r\n        }\r\n\r\n        # proxy the PHP scripts to Apache listening on 127.0.0.1:80\r\n        #\r\n        #location ~ \\.php$ {\r\n        #    proxy_pass   http:\/\/127.0.0.1;\r\n        #}\r\n\r\n        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000\r\n        #\r\n        location ~ \\.php$ {\r\n            root           html;\r\n            include        fastcgi.conf;\r\n            fastcgi_pass   127.0.0.1:9000;\r\n            fastcgi_index  index.php;\r\n        #    fastcgi_param  SCRIPT_FILENAME  \/scripts$fastcgi_script_name;\r\n            include        fastcgi_params;\r\n        }\r\n\r\n        # deny access to .htaccess files, if Apache's document root\r\n        # concurs with nginx's one\r\n        #\r\n        #location ~ \/\\.ht {\r\n        #    deny  all;\r\n        #}\r\n        location \/phpmyadmin {\r\n\t\t  root \/Library\/WebServer\/Documents;\r\n\r\n\t\t  index index.php;\r\n\r\n\t\t  try_files $uri $uri\/ \/phpmyadmin\/index.php$args$is_args;\r\n\r\n\t\t  location ~ \\.php$ {\r\n\t\t\tfastcgi_pass   127.0.0.1:9000; # you may change this to fit your env\r\n\t\t\tfastcgi_index  index.php;\r\n\t\t\tfastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;\r\n\t\t\tinclude        fastcgi_params;\r\n\t\t  }\r\n\t\t}\r\n    }\r\n\r\n\r\n    # another virtual host using mix of IP-, name-, and port-based configuration\r\n    #\r\n    #server {\r\n    #    listen       8000;\r\n    #    listen       somename:8080;\r\n    #    server_name  somename  alias  another.alias;\r\n\r\n    #    location \/ {\r\n    #        root   html;\r\n    #        index  index.html index.htm;\r\n    #    }\r\n    #}\r\n\r\n\r\n    # HTTPS server\r\n    #\r\n    #server {\r\n    #    listen       443 ssl;\r\n    #    server_name  localhost;\r\n\r\n    #    ssl_certificate      cert.pem;\r\n    #    ssl_certificate_key  cert.key;\r\n\r\n    #    ssl_session_cache    shared:SSL:1m;\r\n    #    ssl_session_timeout  5m;\r\n\r\n    #    ssl_ciphers  HIGH:!aNULL:!MD5;\r\n    #    ssl_prefer_server_ciphers  on;\r\n\r\n    #    location \/ {\r\n    #        root   html;\r\n    #        index  index.html index.htm;\r\n    #    }\r\n    #}\r\n    include servers\/*;\r\n    include \/usr\/local\/etc\/nginx\/sites-enabled\/*;\r\n}\r\n<\/pre>\n<p>RESTART nginx SERVICE<\/p>\n<pre class=\"lang:default decode:true \">brew services restart nginx<\/pre>\n<p>CHECK THE CONFIG. BUT I GOT SOME ERROR AND MANAGE TO SOLVE IT<\/p>\n<pre class=\"lang:default decode:true \">Satrias-MacBook-Pro:nginx teddy$ nginx -t\r\nnginx: the configuration file \/usr\/local\/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: [emerg] open() \"\/usr\/local\/etc\/nginx\/logs\/osclass374.access.log\" failed (13: Permission denied)\r\nnginx: configuration file \/usr\/local\/etc\/nginx\/nginx.conf test failed\r\nSatrias-MacBook-Pro:nginx teddy$ sudo chmod 777 \/usr\/local\/etc\/nginx\/logs\/osclass374.access.log\r\nPassword:\r\nSatrias-MacBook-Pro:nginx teddy$ nginx -t\r\nnginx: the configuration file \/usr\/local\/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: [emerg] open() \"\/usr\/local\/etc\/nginx\/logs\/osclass374.error.log\" failed (13: Permission denied)\r\nnginx: configuration file \/usr\/local\/etc\/nginx\/nginx.conf test failed\r\nSatrias-MacBook-Pro:nginx teddy$ sudo chmod 777 \/usr\/local\/etc\/nginx\/logs\/osclass374.error.log\r\nSatrias-MacBook-Pro:nginx teddy$ nginx -t\r\nnginx: the configuration file \/usr\/local\/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/usr\/local\/etc\/nginx\/nginx.conf test is successful<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Run &#8216;brew doctor&#8217;. BUT I GOT SOME WARNINGS: 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&#8217;t worry or file an issue; just ignore this. Thanks! Warning: You have &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/07\/29\/macos-mojave-nginx\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;MacOS Mojave Nginx&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-4404","post","type-post","status-publish","format-standard","hentry","category-macosx"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=4404"}],"version-history":[{"count":5,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4404\/revisions"}],"predecessor-version":[{"id":4408,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/4404\/revisions\/4408"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=4404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=4404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=4404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}