免费注册 查看新帖 |

Chinaunix

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

向大家求助,关于apache2.4的路径问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-04-20 20:49 |只看该作者 |倒序浏览
本帖最后由 何信哲 于 2016-04-20 20:49 编辑

在Debian下折腾apache2.4,apache2.conf配置完了,service apache2 start成功,也可以访问服务器。
但,我通过 apache2 -t 查看配置语法时,却出现了好几行的路径未定义,截图见下方。
我尝试source ./envvars后 resatrt apache2,可还是会出上述错误。
请问各位好心人士,已经可以访问服务器内容了,却出现这种情况,是什么原因?
谢谢。

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
2 [报告]
发表于 2016-04-21 12:24 |只看该作者
  1. Syntac error on line 75 of /etc/apache2/apace2.conf
复制代码

论坛徽章:
0
3 [报告]
发表于 2016-04-21 12:34 |只看该作者
谢谢你的回答。
回复 2# q1208c

我的./envvars如下,我ps aux过,发现其中export的User = www-data确实加载到apache2.conf里了,可路径却没有,是需要添加{APACHE_CONFDIR}么?



    # envvars - default environment variables for apache2ctl

# this won't be correct after changing uid
unset HOME

# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
        SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
        SUFFIX=
fi

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
# temporary state file location. This might be changed to /run in Wheezy+1
export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale

export LANG

## The command to get the status for 'apache2ctl status'.
## Some packages providing 'www-browser' need '--dump' instead of '-dump'.
#export APACHE_LYNX='www-browser -dump'

## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'

## If you would like to pass arguments to the web server, add them below
## to the APACHE_ARGUMENTS environment.
#export APACHE_ARGUMENTS=''

## Enable the debug mode for maintainer scripts.
## This will produce a verbose output on package installations of web server modules and web application
## installations which interact with Apache
#export APACHE2_MAINTSCRIPT_DEBUG=1

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
4 [报告]
发表于 2016-04-21 12:50 |只看该作者
回复 3# 何信哲

我还真没配置过 debian/ubuntu  上的 apache。
因为总觉得那上面的配置好奇怪, 原来一个文件就够了, 被拆成了一堆, 还要加上一个环境变量文件。

不知道这是怎么想的。
   

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-05-14 06:20:00
5 [报告]
发表于 2016-05-11 15:18 |只看该作者
香港IDC葵芳中心机房直连中国电信(香港)、香港CN2线路,BGP包括PCCW 九仓 新世界  宽频  合记等!

香港葵芳信息有限公司,为各类用户提供优质服务器,为客户提供保姆式售后,免费重装系统,重启,增加机柜挡板,系统测试,维护等!!

香港葵芳机房的目标是:通过整合中国大陆、香港及海外互联网网络资源,给客户提供真正的钻石级互联网服务!

香港服务器租用业务:
CPU:I5 2320             内存:4G    硬盘:500G  IP:1个   800/月
CPU:双志强L5520 8核     内存:8G    硬盘:1T    IP:1个   800/月
CPU:双志强L5639 12核    内存:16G   硬盘:1T    IP:1个   1200/月
CPU:双志强E5-2603*2     内存:16G   硬盘:1T    IP:1个   1500/月

以上所有机器默认带宽独享(香港国际带宽) 可根据需求随时增加带宽

机器托管业务:

1U 托管 600元/月  6600/年  独享国际带宽  3M
2U 托管 700元/月  7700/年  独享国际带宽  3M
4U 托管 900元/月  9900/年  独享国际带宽  3M

整柜租用 42U机柜 6000元/月 9A电量

详情了解请直接加一下QQ  2851041319 电话18575592699 24小时在线   机房24小时技术值班   可以提供测试机
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP