首先創(chuàng)建www用戶和組,
成都創(chuàng)新互聯(lián)公司服務(wù)項(xiàng)目包括沂源網(wǎng)站建設(shè)、沂源網(wǎng)站制作、沂源網(wǎng)頁(yè)制作以及沂源網(wǎng)絡(luò)營(yíng)銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,沂源網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到沂源省份的部分城市,未來相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!虛擬主機(jī)使用的目錄:
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
mkdir -p /data0/htdocs/www
chmod +w /data0/htdocs/www
chown -R www:www /data0/htdocs/www
安裝Momo
yum groupinstall "Development Tools"
yum install httpd build-essential gcc bzip bison pkgconfig glib-devel glib2-devel httpd-devel libpng-devel libX11-devel freetype fontconfig pango-devel ruby ruby-rdoc gtkhtml38-devel wget
wget http://pkgs.fedoraproject.org/repo/pkgs/mono/mono-2.6.1.tar.bz2/4cd2157c9eabbe9f49232d5ee3a2a57e/mono-2.6.1.tar.bz2
tar jxvf mono-2.6.1.tar.bz2
cd mono-2.6.1/
./configure --prefix=/usr
make
make install
cd ../
從SVN版本庫(kù)安裝fastcgi-momo-server
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/lib/
yum install subversion
svncohttp://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/fastcgi-mono-server
cd fastcgi-mono-server/
./autogen.sh
make
make install
cd ../
以Fastcgi方式啟動(dòng)fastcgi-momo-server2,監(jiān)聽本機(jī)9001端口,網(wǎng)頁(yè)根目錄為/data0/htdocs/www/
nohup /bin/sh /usr/local/bin/fastcgi-mono-server2 /socket=tcp:9001 /root=/data0/htdocs/www/ 2>&1 > /dev/null &
安裝Nginx 0.8.46
1、安裝Nginx所需的pcre庫(kù):
wget http://ftp.exim.llorien.org/pcre/pcre-8.12.tar.gz
tar zxvf pcre-8.12.tar.gz
cd pcre-8.12/
./configure
make && make install
cd ../
2、安裝Nginx
wget http://nginx.org/download/nginx-0.8.46.tar.gz
tar zxvf nginx-0.8.46.tar.gz
cd nginx-0.8.46/
./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ../
3、創(chuàng)建Nginx日志目錄
mkdir -p /data1/logs
chmod +w /data1/logs
chown -R www:www /data1/logs
4、創(chuàng)建Nginx配置文件
①、在/usr/local/webserver/nginx/conf/目錄中創(chuàng)建nginx.conf文件:
rm -f /usr/local/webserver/nginx/conf/nginx.conf
vi /usr/local/webserver/nginx/conf/nginx.conf
修改nginx.conf
userwwwwww;
worker_processes8;
error_log/usr/local/webserver/nginx/logs/nginx_error.logcrit;
pid/usr/local/webserver/nginx/nginx.pid;
#Specifiesthevalueformaximumfiledescriptorsthatcanbeopenedbythisprocess.
worker_rlimit_nofile65535;
events
{
useepoll;
worker_connections65535;
}
http
{
includemime.types;
default_typeapplication/octet-stream;
charsetutf-8;
server_names_hash_bucket_size128;
client_header_buffer_size32k;
large_client_header_buffers432k;
client_max_body_size8m;
sendfileon;
tcp_nopushon;
keepalive_timeout60;
tcp_nodelayon;
fastcgi_connect_timeout300;
fastcgi_send_timeout300;
fastcgi_read_timeout300;
fastcgi_buffer_size64k;
fastcgi_buffers464k;
fastcgi_busy_buffers_size128k;
fastcgi_temp_file_write_size128k;
gzipon;
gzip_min_length1k;
gzip_buffers416k;
gzip_http_version1.1;
gzip_comp_level2;
gzip_typestext/plainapplication/x-javascripttext/cssapplication/xml;
gzip_varyon;
server
{
listen80;
server_namewww.yourdomain.com;
indexindex.htmlindex.htmindex.aspxdefault.aspx;
root/data0/htdocs/www;
location~.(aspx|asmx|ashx|asax|ascx|soap|rem|axd|cs|config|dll)?${
fastcgi_pass127.0.0.1:9001;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
includefastcgi_params;
}
location~.*.(gif|jpg|jpeg|png|bmp|swf)$
{
expires30d;
}
location~.*.(js|css)?$
{
expires1h;
}
access_logoff;
}
}
測(cè)試配置文件是否正確
/usr/local/webserver/nginx/sbin/nginx -t
在/data0/htdocs/www/目錄下載名為info.aspx的asp探針文件。檢查asp.net是否能正常運(yùn)行
cd /data0/htdocs/www/
wget http://aspnetsysinfo.googlecode.com/files/aspnetsysinfo-revision_23.zip
瀏覽器測(cè)試
http://IP/info.aspx