Ubuntu - Apache2 - apache2: bad user name ${APACHE_RUN_USER}
在Ubuntu下sudo apt-get install apache2安装完Apache2以后,启动apache2的默认用户名是www-data, 属于www-data用户组
在shell中按如下输入
#apache2
会出现错误提示:
apache2: bad user name ${APACHE_RUN_USER}
解决办法:
1. 打开apache2的配置文件
#sudo gedit /etc/apache2/apache2.conf
(本来应该改envvars这个文件的,但是不知道为什么修改了不起作用)
2. 修改默认的用户名和组
找到 ${APACHE_RUN_USER} 和 ${APACHE_RUN_GROUP}
替换为自己的用户名和组,然后保存退出。
3.重启apache2
#apache2 -k graceful
注意,要让自己的用户对/var/www这个目录有写权限,否则你的脚本可能会出问题的。
当然,可以打开/etc/apache2/sites-enabled/000-default修改网站文件的根目录。
分享到:
相关推荐
shards-jdbc分库分表实例 dataSources: ds0: !... algorithmExpression: ds${user_id % 2} defaultTableStrategy: none: defaultKeyGenerator: type: SNOWFLAKE props: sql.show: true
气流审查Apache Airflow功能的迷你回顾快速气流命令行设置: $ python -m venv airflow_play$ source airflow_play/bin/activate$ pip install apache-airflow$ cd airflow_play/$ mkdir airflow_home$ export ...
更换ssl证书后,重启Apache失败。 查看Apache的error日志发现: 代码如下: [Fri May 20 18:07:23 2011] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration ...
Tomcat是由Apache软件基金会属下Jakarta项目开发的Servlet容器,按照Sun Microsystems提供的技术规范,实现了对Servlet和JavaServer Page(JSP)的支持,并提供了作为Web服务器的一些特有功能,如Tomcat管理和控制...
Apache_Wicket_User_Guide_Reference_Documentation 英文版
支持的日志类型Apache,Nginx,Tengine,IIS支持的日志格式Apache1,$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent;2,$remote_addr - $remote_user [$time_local] "$request" $...
$ server_apache_config = '/etc/apache2/apache2.conf' ;$ apache_config_parser = new Apache_Config_Parser ( $ server_apache_config );$ apache_hosts = $ apache_config_parser -> getApacheHosts ();echo '...
Apache Sqoop Docker映像 注意:这是master分支-对于特定的Sqoop版本,请始终检查相关分支 用法 运行时,您必须在卷中提供JDBC jar: docker run -v /path/to/jdbc-jars:/jdbc -it dvoros/sqoop:latest MySQL导入...
Apache JMeter: A practical beginner's guide to automated testing and performance measurement for your websites Book Description: Learn to load-test your website, test its functional behaviour, and ...
重启apache:service httpd restart虽然重启成功,但却给出如下的提示信息:httpd: apr_sockaddr_info_get() failed for hoteelhttpd: Could not reliably determine the server’s fully qualified domain name, ...
Apache_OpenOffice_4.1.2_Linux_x86_install-rpm_zh-CN.tar.gz Apache_OpenOffice_4.1.7_Linux_x86-64_install-rpm_zh-CN.tar.gz windows安装包: Apache_OpenOffice_4.1.4_Win_x86_install_zh-CN.exe Apache_...
指示通过以下方式运行容器: docker run --rm \ -v ${DOCUMENT_ROOT}:/var/www/ \ -v ${SITES_ENABLED}:/etc/apache2/sites-enabled \ -p 80:80 \ -p 443:443 \ -e "DOMAINS=" \ -e "WEBMASTER_MAIL=" \ --name ...
适用于Apache:registered:Spark的.NET用于Apache Spark的.NET提供了用于使用C#和F#中的Apache Spark的高性能API。 借助这些.NET API,您可以访问Apache Spark最受欢迎的数据帧和SparkSQL方面,因为.NET forApache:...
为简单起见,如果您想使用pypache ,请将以下行添加到/etc/apache2/apache2.cfg : LogFormat "%h %l %u %t %r %>s %O | %{Referer}i | %{User-Agent}i" pypache 现在打开您的文件/etc/apache2/sites-enabled/...
适用于Apache:registered:Spark:trade_mark:的.NET .NET为Apache火花提供高性能的API使用从C#和F#。 使用这些.NET API,您可以访问Apache Spark最流行的Dataframe和SparkSQL方面(用于处理结构化数据),以及Spark...
2.拷贝mod_jk.conf和workers.properties文件至Apache目录的conf目录下 3.Apache目录下的conf目录的httpd.conf文件末行增加内容: include "conf/mod_jk.conf" Tomcat: 1.分别复制三个tomcat 2.配置conf/server....
复制代码 代码如下:<? function PMA_getenv($var_name) { if (isset($_SERVER[$var_name])) { return $_SERVER[$var_name];... } elseif (function_exists(‘apache_getenv’) && apache_getenv($var_name, tr
apache+Windows配置flv,mp4视频支持随意拖动 解压得到下面二个文件: mod_flvx.so mod_h264_streaming.so 把这两个文件放到,apache的modules目录中,然后查找httpd.conf这个文件,打开编辑,找到类似这样的...