移除welcome.conf
mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.backup
subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so # # Example configuration to enable HTTP access for a directory # containing Subversion repositories, "/var/www/svn". Each repository # must be both: # # a) readable and writable by the 'apache' user, and # # b) labelled with the 'httpd_sys_content_t' context if using # SELinux # # # To create a new repository "http://localhost/repos/stuff" using # this configuration, run as root: # # # cd /var/www/svn # # svnadmin create stuff # # chown -R apache.apache stuff # # chcon -R -t httpd_sys_content_t stuff #Allow from all DAV svn SVNParentPath /srv/svn AuthType Basic AuthName "svn.agimvc.com" AuthUserFile /srv/svn_conf/httpd_passwd AuthzSVNAccessFile /srv/svn_conf/authz Require valid-user
安装SVN
yum install subversion.x86_64 mod_dav_svn.x86_64
编译安装Nginx
wget http://nginx.org/download/nginx-1.2.7.tar.gz tar zvxf nginx-1.2.7.tar.gz yum install -y kernel-headers.x86_64 kernel.x86_64 kernel-devel.x86_64 gcc.x86_64 gcc automake autoconf libtool make yum install -y zlib-devel.x86_64 openssl-devel.x86_64 pcre-devel.x86_64 libaio-devel.x86_64 automake.noarch
编译Nginx指令
./configure --prefix=/usr/local/nginx --conf-path=/etc/nginx/nginx.conf --with-poll_module --with-file-aio --with-http_ssl_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_stub_status_module --with-pcre make && make install
配置Nginx
mkdir /var/log/nginx mkdir /etc/nginx/vhost nano /etc/nginx/nginx.conf
user www www;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/log/nginx/nginx.pid;
events {
use epoll;
worker_connections 4096;
}
http {
include mime.types;
default_type application/octet-stream;
server_tokens off;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
include gzip.conf;
# All websites defined in here
include /etc/nginx/vhost/*.conf;
}
nano /etc/nginx/gzip.conf
gzip on; gzip_min_length 1000; gzip_types text/plain text/css application/x-javascript;
nano /etc/nginx/vhost/default.conf
server {
# this port should be 80
listen 80;
server_name localhost;
location / {
root /srv/www;
index index.html index.htm;
}
location ~ \.php$ {
root /srv/www;
fastcgi_pass unix:/dev/shm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}