汇总这几天配置阿里云环境出现的问题

最近买了半年的阿里云的那个服务器,并用在了自己的博客上。记录下出现的问题,我用的服务器环境是centos 64位的。

第一个是,在yum安装玩环境后绑定自己的域名,

首先修改两个文件是linux的 /etc/host 文件。

QQ截图20140729160033

再就是修改http.conf的配置文件,(网上看到有些说绑定域名在vhost文件下,这样做的话需要在http.conf里包含下。)

<VirtualHost 182.92.100.75:80>
ServerAdmin tianwei@coderlife useful source.cn
DocumentRoot /var/www/html/coderlife
ServerName coderlife.cn
ServerAlias *.coderlife.cn
ErrorLog logs/dummy-coderlife.cn-error_log
CustomLog logs/dummy-coderlife.cn-access_log common
</VirtualHost>

第二个问题是,ftp环境的配置,

之前配好之后不知为啥用ftp覆盖不了,最后直接放大招卸载重新安装一遍就好了。
linux ftp环境配置

第三个问题是,我在环境弄好之后上传博客文件,我的首页只显示一个最新发表的一个标题,

往下什么也不显示了。

查看模板源文件,最后发现问题在函数mb_strwidth上,当时还纠结了一个怎么不行。

后来一想是不是我这php_mbstring的扩展没开?通过phpinfo() 还真是没开,解决办法就是直接yum 安装mb_string扩展

yum install php-mbstring*

再一个问题就是,发现我的URL重新出现错误,.htaccess不管用。

解决办法是配置下httpd.conf下的。AllowOverride All 原版是AllowOverride None

<Directory "/var/www/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# //httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

转载请注明:码农生活-田伟博客 » 汇总这几天配置阿里云环境出现的问题

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

关闭菜单