免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1398 | 回复: 1
打印 上一主题 下一主题

apache 的一个配置问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-04-10 19:37 |只看该作者 |倒序浏览
我的vps 地址是 108.171.241.*  然后我想直接ip 地址访问
我在/home/osqa/osqa-server 下的文件 ,请问应该如何配置

下面是配置的模板,但是我还是不知道
ServerAdmin forum@example.com
        DocumentRoot /home/osqa/osqa-server
        ServerName example.com  这里是如何填的

  1. # Must be readable and writable by apache
  2. WSGISocketPrefix ${APACHE_RUN_DIR}

  3. #NOTE: all urs below will need to be adjusted if
  4. #settings.FORUM_SCRIPT_ALIAS !='' (e.g. = 'forum/')
  5. #this allows "rooting" forum at [http://example.com/forum], if you like
  6. <VirtualHost *:80>
  7.         ServerAdmin forum@example.com
  8.         DocumentRoot /home/osqa/osqa-server
  9.         ServerName example.com

  10.         #run mod_wsgi process for django in daemon mode
  11.         #this allows avoiding confused timezone settings when
  12.         #another application runs in the same virtual host
  13.         WSGIDaemonProcess OSQA
  14.         WSGIProcessGroup OSQA

  15.         #force all content to be served as static files
  16.         #otherwise django will be crunching images through itself wasting time
  17.         Alias /m/ "/home/osqa/osqa-server/forum/skins/"
  18.         <Directory "/home/osqa/osqa-server/forum/skins">
  19.                 Order allow,deny
  20.                 Allow from all
  21.         </Directory>
  22.         Alias /upfiles/ "/home/osqa/osqa-server/forum/upfiles/"
  23.         <Directory "/home/osqa/osqa-server/forum/upfiles">
  24.                 Order deny,allow
  25.                 Allow from all
  26.         </Directory>

  27.         #this is your wsgi script described in the prev section
  28.         WSGIScriptAlias / /home/osqa/osqa-server/osqa.wsgi

  29.         CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
  30.         ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
  31. </VirtualHost>
复制代码

论坛徽章:
4
技术图书徽章
日期:2013-09-23 10:22:37狮子座
日期:2013-10-15 23:31:54卯兔
日期:2013-11-11 17:33:15金牛座
日期:2013-11-15 17:25:28
2 [报告]
发表于 2012-04-10 22:13 |只看该作者
apache默认会访问第一个virtualhost的配置
反正你用ip地址访问
ServerName example.com
就可以了,只要确保这个virtualhost之前没有别的virtualhost配置
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP