zoukankan      html  css  js  c++  java
  • wordpress配置通过IP直接访问及apache的配置

    wordpress配置通过IP直接访问


    环境:
    操作系统:centos6.5


    yum安装lamp环境:
    yum -y install mysql mysql-server php php-mysql httpd php-gd* freetype freetype-devel libmcrypt libmcrypt-devel mcrypt mhash php-mcrypt


    apache版本:2.2.15


    wordpress程序目录:/var/www/html/wordpress/


    1.直接编辑vim /etc/httpd/conf/httpd.con中的DocumentRoot即可


    DocumentRoot "/var/www/html/wordpress"




    2.虚拟主机方式:
    vim /etc/httpd/conf.d/vhosts.conf
    加入如下内容:


    NameVirtualHost *:80


    <VirtualHost *:80>


         DocumentRoot /error


         ServerName error.com


    </VirtualHost>


    <Directory "/var/www/html/wordpress/">


       php_admin_value open_basedir "/var/www/html/wordpress/:/tmp/"


       Options Includes ExecCGI FollowSymLinks


       AllowOverride All


       Order allow,deny


       Allow from all


    </Directory>


    <VirtualHost *:80>


        DocumentRoot /var/www/html/wordpress/


        ServerName 192.168.1.22:80


    </VirtualHost>


    访问报错:



    解决:

    http://192.168.1.22/wp-admin登陆后台修改即可


  • 相关阅读:
    nyoj58 最少步数
    oj2787 算24
    一位ACMer过来人的心得
    hdu递推公式水题
    nyoj20 吝啬的国度
    hdu1421 搬寝室
    全排列生成算法:next_permutation
    hdu2544 最短路
    poj1691 Painting A Board
    hdu1274 展开字符串
  • 原文地址:https://www.cnblogs.com/reblue520/p/6239720.html
Copyright © 2011-2022 走看看