安裝
安裝Memcached
sudo apt-get install memcached
安裝php memcached套件
sudo apt-get install php5-memcache
重新啟動apache載入memcached套件
sudo /etc/init.d/apache2 restart
sudo apt-get install memcached
sudo apt-get install php5-memcache
sudo /etc/init.d/apache2 restart
/etc/apache2/apache2.conf
) 設定或加入ServerTokens Prod重新啟動Apache,然後你就會看到Response Header中顯示為 Server: Apache
ServerSignature Off
ServerTokens Value | Server Sends |
---|---|
Full (or not specificed) | Server: Apache/2.2.17 (Win32) PHP/5.2.17 |
Prod (or ProductOnly) | Server: Apache |
Major | Server: Apache/2 |
Minor | Server: Apache/2.2 |
Min (or Minimal) | Server: Apache/2.2.17 |
OS | Server: Apache/2.2.17 (Win32) |
/etc/php5/apache2/php.ini
) 設定或加入expose_php Off重新啟動伺服器,然後你就會看到Response Header中,原本的
X-Powered-By:PHP/5.3.2-1ubuntu4.21
這樣的訊息就不見了kejyun.git
為例)中,開啟config
的檔案,將設定值改成下面的範例,主要是bare設定為false
,worktree設定為你要同步的資料夾
(/var/www),denycurrentbranch設為ignore
[root@ip-XXX-XXX-XXX-XXX ec2-user]# vim /etc/httpd/conf.d/virtual.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerName kejyun.twbbs.org DocumentRoot /var/kejyun
</VirtualHost>
<VirtualHost *:80>
ServerName shihgu.twbbs.org
DocumentRoot /var/shihgu
</VirtualHost>
<Directory "/var/kejyun"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/var/shihgu"> Options FollowSymLinks Indexes AllowOverride None Order allow,deny Allow from all </Directory>
[root@ip-XXX-XXX-XXX-XXX ec2-user]# /etc/init.d/httpd restart