Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting up site with homebrewed nginx got 404 on site? Reason why it is happening?
    primarykey
    data
    text
    <p>I found many links regarding this type of topic , so far i still could not solve my problem. I have just installed nginx via homebrew. Here are the steps that i did :</p> <ol> <li><p>Added site name to etc/hosts</p> <pre><code>127.0.0.1 mysite.com </code></pre></li> <li><p>On my usr/local/etc/nginx, i created folder using</p> <pre><code>mkdir sites </code></pre> <p>(most instructions i have read so far already have sites-enabled or sites-default on thier setup, but mine was clean so i created one.) Then within the folder i created file just using vim : </p> <pre><code>vim mysite </code></pre> <p>then in the file i have this :</p> <pre><code>server { listen 80; server_name mysite.com; root /Users/myname/mysite/mainsite; client_max_body_size 10M; # serve static files location ~ ^/(images|javascript|js|css|flash|media|static)/ { expires 30d; } location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php$is_args$args; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /opt/local/share/nginx/html; } location ~ \\.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param FF_BOOTSTRAP_ENVIRONMENT dev; fastcgi_param FF_BOOTSTRAP_CONFIG webroot/dev; fastcgi_buffer_size 1024k; fastcgi_buffers 1024 1024k; fastcgi_busy_buffers_size 1024k; include /usr/local/etc/nginx/fastcgi.conf; } } </code></pre></li> </ol> <p>After this i include my created folder to nginx.conf and nginx.cnf.default but after this i still get a 404 error. The above configuration on mysite file, except for some directory changes, worked on my other computer but some how i cant replicate for it to work, I tried revising and editing my directory in root but i still get 404. Did I miss some important stuff when configuring? Or what are the other possible reasons why i cannot access mysite.com after the above configuration or how i would get 404. Also i think no other background applications are currently running because i have just restarted the computer to see it the site doesnt work.. Any more suggestions why this might be happening? Thanks in advance</p> <p>404 :( </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload