一、按照官方幫助裝好web環境,我選擇的是apache
二、將按照程序上傳到/alidata/www,我命名爲sns
三、修改apache 配置文件:/alidata/server/httpd-2.2.22/conf/vhosts/phpwind.conf,添加虛擬主機,代碼以下php
<DirectoryMatch "/alidata/www/sns/(attachment|html|data)"> <Files ~ ".php"> Order allow,deny Deny from all </Files> </DirectoryMatch> <VirtualHost *:80> DocumentRoot /alidata/www/sns ServerName localhost ServerAlias localhost <Directory "/alidata/www/sns"> Options -Indexes FollowSymLinks AllowOverride all Order allow,deny Allow from all </Directory> <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)-htm-(.*)$ $1.php?$2 RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 </IfModule> ErrorLog "/alidata/log/httpd/sns-error.log" CustomLog "/alidata/log/httpd/access/sns.log" common </VirtualHost>
四、重啓apache
在putty下執行命令:html
cd /alidata/server/httpd-2.2.22/bin ./apachectl stop ./apachectl graceful 或者執行 ./apachectl restart
五、訪問ip地址安裝程序
第二步的時候會提示文件不可寫,進入安裝目錄,修改文件夾及其子文件權限
web
cd /alidata/www/sns chmod 777 -R data chmod 777 -R _runtime chmod 777 -R install chmod 777 -R config
附:阿里雲的幫助文檔:
shell
http://help.aliyun.com/manual?spm=0.0.0.0.dKjDNa&&helpId=129
在這裏有如何一鍵安裝web環境,如何查看ftp和數據庫密碼數據庫