As mentioned by others, node.js is a language, not a web server. However, it is a very easy to get a web server setup in node.js using one of the many frameworks. Here are a couple in order of (my perceived) popularity:
- http://expressjs.com/ (Without a doubt the most popular. I would recommend starting here. It does lack some of the niceties of a super high level framework, but it is trivial to get something up and running) - http://www.meteor.com/ (A corporate backed (I think?) framework that focuses on real time data binding) - http://derbyjs.com/ (I have not used it so I do not have too many details, but I know it gets used and is one of the frontrunners) - http://flatironjs.org/ (Maintained by nodejitsu, which means it will probably be around for a while. flatiron is generally based off the philosophy that you can build whatever you want from modular components) - http://tower.github.io/ (tower is basically like RoR in node.js. The default language is coffeescript, if that matters to you, although I assume you can use whatever you want) This is meant only as a beginner's high level overview based on my light usage (with the exception of express, which I use in production), so take what I say with a grain of salt. There are loads options here, and you can choose from a number of them without making a bad choice. Hope that helps! On Tuesday, October 22, 2013 4:21:27 PM UTC-4, jai bharat wrote: > > Hello, > > I have this sample virtual host config file on apache, & the webserver > config file. > > I am confused how can i have equivalent config if i decide to use Node.js > for web server? > > pl advice: > > ================================================= > <VirtualHost *:80> > ServerName mywebsite.com > ServerAlias mywebsite.com > ServerAdmin [email protected] <javascript:> > ServerSignature Off > DocumentRoot /var/www/mywebsite.com/www > <Directory /> > Options +FollowSymLinks > AllowOverride AuthConfig > Order allow,deny > allow from all # Standard auth stuff > </Directory> > <Directory /var/www/mywebsite.com/www/> > Options +FollowSymLinks +MultiViews +Includes > AllowOverride None > Order allow,deny > allow from all > </Directory> > ScriptAlias /cgi-bin/ /var/www/mywebsite.com/cgi-bin/ > <Directory "/var/www/mywebsite.com/cgi-bin/"> > AllowOverride None > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch +Includes > AddHandler cgi-script cgi pl #was added > Order allow,deny > Allow from all > </Directory> > ErrorLog ${APACHE_LOG_DIR}/mywebsite.com.error.log > # Possible values include: debug, info, notice, warn, error, crit, > # alert, emerg. > LogLevel warn > SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded > CustomLog ${APACHE_LOG_DIR}/mywebsite.com.access.log combined > env=!forwarded > CustomLog ${APACHE_LOG_DIR}/mywebsite.com.access.log proxy env=forwarded > Alias /doc/ "/usr/share/doc/" > <Directory "/usr/share/doc/"> > Options Indexes MultiViews FollowSymLinks > AllowOverride None > Order deny,allow > Deny from all > Allow from 127.0.0.0/255.0.0.0 ::1/128 > </Directory> > DirectoryIndex /cgi-bin/index.pl > </VirtualHost> > ================================================= > > > > > > Also how to have webserver config like below: > > =============================================== > ### Section 1: Global Environment > #ServerRoot "/etc/apache2" > LockFile ${APACHE_LOCK_DIR}/accept.lock > PidFile ${APACHE_PID_FILE} > Timeout 300 > KeepAlive On > MaxKeepAliveRequests 100 > KeepAliveTimeout 5 > # prefork MPM > <IfModule mpm_prefork_module> > StartServers 5 > MinSpareServers 5 > MaxSpareServers 10 > MaxClients 150 > MaxRequestsPerChild 0 > </IfModule> > # worker MPM > <IfModule mpm_worker_module> > StartServers 2 > MinSpareThreads 25 > MaxSpareThreads 75 > ThreadLimit 64 > ThreadsPerChild 25 > MaxClients 150 > MaxRequestsPerChild 0 > </IfModule> > # event MPM > <IfModule mpm_event_module> > StartServers 2 > MinSpareThreads 25 > MaxSpareThreads 75 > ThreadLimit 64 > ThreadsPerChild 25 > MaxClients 150 > MaxRequestsPerChild 0 > </IfModule> > # These need to be set in /etc/apache2/envvars > User ${APACHE_RUN_USER} > Group ${APACHE_RUN_GROUP} > AccessFileName .htaccess > <Files ~ "^\.ht"> > Order allow,deny > Deny from all > Satisfy all > </Files> > DefaultType None > HostnameLookups Off > ErrorLog ${APACHE_LOG_DIR}/error.log > LogLevel warn > Include mods-enabled/*.load > Include mods-enabled/*.conf > Include httpd.conf > Include ports.conf > LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" > \"%{User-Agent}i\"" vhost_combined > LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" > combined > LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" > \"%{User-Agent}i\"" proxy > LogFormat "%h %l %u %t \"%r\" %>s %O" common > LogFormat "%{Referer}i -> %U" referer > LogFormat "%{User-agent}i" agent > Include conf.d/ > Include sites-enabled/ > Include /etc/phpmyadmin/apache.conf > ======================================================= > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
