Permalink
Browse files

changed readme and added some blind passthru of css,js,img paths to node

  • Loading branch information...
1 parent 41ddafa commit b5e13bdb973b9ebfb9d4173b2019d545bba2256b @shimondoodkin committed Jul 16, 2010
Showing with 41 additions and 2 deletions.
  1. +2 −2 README.md
  2. +39 −0 my_enginx_config/nginx/sites-enabled/default
View
@@ -99,7 +99,7 @@ If I want to stop the server I press `Control + C`
and the script stops.
### Nginx?
-Yes I also use Nginx as front.
-To let me in the future to change and integrate different servers seemlessly.
+Yes I also use Nginx as front. (but it is not required). I use it
+to let me in the future to change and integrate different servers seemlessly.
It is basicly: nginx<->nodejs as an upstream.
also i added php-cgi to nginx to use moadmin.php - mongodb db editor.
@@ -3,6 +3,7 @@
# ...
# }
# statements for each of your virtual hosts
+keepalive_requests 1000;
server {
listen 80 default;
@@ -47,6 +48,44 @@ server {
# setup below some locations for your website
+ #some paths need to be piped directry like paths with rewrite,
+ # and paths you want node to serve when nginx is the default server for it.
+ location ~ ^/lib/
+ {
+# auth_basic "Hello, please login";
+ # auth_basic_user_file /var/www/htpasswd;
+
+ proxy_pass http://127.0.0.1:8000; # uncomment this for this port will work for the root / of the website
+ break;
+ }
+
+ location ~ ^/css/
+ {
+ # auth_basic "Hello, please login";
+ # auth_basic_user_file /var/www/htpasswd;
+
+ proxy_pass http://127.0.0.1:8000;
+ break;
+ }
+
+ location ~ ^/js/ # i server the css and js and images cached from memory from node js so mine is probably faster then nginx's
+ {
+ # auth_basic "Hello, please login";
+ # auth_basic_user_file /var/www/htpasswd;
+
+ proxy_pass http://127.0.0.1:8000;
+ break;
+ }
+
+ location ~ ^/img/
+ {
+# auth_basic "Hello, please login";
+ # auth_basic_user_file /var/www/htpasswd;
+
+ proxy_pass http://127.0.0.1:8000;
+ break;
+ }
+
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#

0 comments on commit b5e13bd

Please sign in to comment.