标签: apache-httpd

安装后httpd无法启动

当我尝试yum install httpd在 Fedora 19 中安装服务器时,启用并启动它会显示错误。我检查了 httpd 状态,它也失败了。有人可以解释问题是什么吗?

[root@localhost ~]# systemctl enable httpd.service
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' 

[root@localhost ~]# systemctl start httpd.service
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details. 

[root@localhost ~]# systemctl status httpd.service
May 18 06:30:50 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
May 18 06:30:50 localhost.localdomain httpd[2226]: httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /..._encode
May 18 06:30:50 localhost.localdomain systemd[1]: httpd.service: main process …
Run Code Online (Sandbox Code Playgroud)

apache-httpd

1
推荐指数
1
解决办法
3万
查看次数

不允许多个 RSA 服务器证书

我购买了一个多域证书,并试图将它安装在我的服务器上。

我将以下信息放入我的网站之一的虚拟主机中:

<VirtualHost *:443>
...
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/16478325.crt
SSLCertificateKeyFile /etc/apache2/ssl/private.key
SSLCertificateChainFile /etc/apache2/ssl/16478325.ca-bundle
...
Run Code Online (Sandbox Code Playgroud)

然后我尝试重新启动 apache,但失败了,我被告知要检查我的 apache 日志。

收到的错误信息是这样的:

Init: Multiple RSA server certificates not allowed
Run Code Online (Sandbox Code Playgroud)

我认为这意味着我必须为整个站点而不是一个域安装 SSL 证书。

但这也不起作用。

我得到了错误:

Illegal attempt to re-initialise SSL for server (SSLEngine On should go in the VirtualHost, not in global scope.)
Run Code Online (Sandbox Code Playgroud)

为什么这不起作用?如何将我的域配置为每个都具有 SSL?

ubuntu ssl certificates apache-httpd

1
推荐指数
1
解决办法
8750
查看次数

找不到页面,但页面在那里

我究竟做错了什么?

当我搜索https://teampass.domain.org/ 时,我看到一个空白屏幕。

当我搜索https://teampass.domain.org/teampass 时,出现以下错误。

Chrome 上的错误:

在此服务器上找不到请求的 URL /teampass/index.php。

IE 上的错误:

找不到网页

HTTP 404

这是对 web 文件夹的权限:

  root@teampass:/var/www/html# ls -l
    total 16
  -rwxrwxr-x. 1 www-data www-data 11510 Oct 30 09:36 index.html
  -rwxr-xr-x. 1 www-data www-data    49 Dec  4 11:01 index.php
  lrwxrwxrwx. 1 www-data www-data    20 Nov  3 16:44 teampass -> /opt/TeamPass-2.1.23
Run Code Online (Sandbox Code Playgroud)

这是文件夹包含的内容:

 root@teampass:/var/www/html/teampass# ls
 admin.php                      error.php         includes           load.php             tools
 admin.settings_api.php         favico.ico        index.php          otv.php              upload
 admin.settings_categories.php  favorites.php     items.export.php   profile.php          users.load.php
 admin.settings.load.php        files             items.import.php   readme.md            users.php
 admin.settings.php …
Run Code Online (Sandbox Code Playgroud)

ubuntu https apache-httpd

1
推荐指数
1
解决办法
3281
查看次数

Apache“模块 mod_alias 不存在”

我在 Debian 上安装了 apache:

sudo apt-get install apache2 apache2-utils
Run Code Online (Sandbox Code Playgroud)

跑了

a2enmod cgi alias env
Run Code Online (Sandbox Code Playgroud)

我想使用ScriptAlias命令。但是我收到消息命令丢失。

我找到了这个答案 ,其中提出了我应该使用的建议

a2enmod mod_alias
Run Code Online (Sandbox Code Playgroud)

当我使用它时,我收到消息

Module mod_alias does not exist
Run Code Online (Sandbox Code Playgroud)

你有什么建议如何解决这个问题吗?

我尝试使用这些说明配置 git 。

debian apache-httpd

1
推荐指数
1
解决办法
7509
查看次数

Apache Web 服务器负载测试(在 Centos6 上运行)

我如何轻松测试我的 Web 服务器 (Apache) 设置可以处理多少请求而不会断开连接或超时。

是否有任何简单的 bash 脚本,或者我必须使用一些复杂的压力测试工具。

linux performance apache-httpd

1
推荐指数
1
解决办法
828
查看次数

Apache 不会在本地网络的 CentOS 上启动

我在 CentOS 7 服务器上安装了 httpd,但systemctl start httpd.service失败了。

需要输入什么特定的命令序列才能httpd在 CentOS 7 上正确启动?


错误信息

从底部的完整结果中提取的准确错误信息如下:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain.   
Set the 'ServerName' directive globally to suppress this message  
Run Code Online (Sandbox Code Playgroud)

另外,根据@DopeGhoti 的建议,日志的内容是:

[root@localhost ~]# vi /var/log/httpd/error_log
(13)Permission denied: AH00091: httpd: could not open error log file /var/www/mytestdeployment/error.log.
AH00015: Unable to open logs
(13)Permission denied: AH00091: httpd: could not open error log file /var/www/mytestdeployment/error.log.
AH00015: Unable to open logs
(13)Permission denied: …
Run Code Online (Sandbox Code Playgroud)

centos apache-httpd

1
推荐指数
1
解决办法
1万
查看次数

访问 URL 时触发操作

假设我向某人发送了一封电子邮件,其中包含指向我网站的链接,我真的希望他会访问它(手指交叉样式):

http://www.example.com/?utm_source=email392
Run Code Online (Sandbox Code Playgroud)

或者

http://www.example.com/somefile.pdf?utm_source=email392
Run Code Online (Sandbox Code Playgroud)

如何通过定期检查使 Linux 在访问此 URL 时触发操作(例如向自己发送自动电子邮件)/var/log/apache2/other_vhosts_access.log

我无法在 PHP 级别执行此操作,因为我需要为各种来源/网站执行此操作(其中一些使用 PHP,有些不使用并且只是指向要下载的文件的链接等;即使对于使用 PHP 的网站) ,我不想修改每一个index.php从那里做,这就是为什么我更喜欢 Apache 日志解析方法)

grep cron logs email apache-httpd

1
推荐指数
1
解决办法
363
查看次数

Linux 和 Unix 系统中是否预先配置了 www-data 用户?

我个人通常使用基于 Debian 的系统,但我对整个 *nix 系列操作系统提出以下问题。

用户通常使用 Apache/Nginx吗www-data,因为 Apache/Nginx 已经附带了一些 *nix 系统,或者通常是由给定的软件(即 Apache/Nginx)创建的?

如果它已经附带了一些系统(在我的例子中是 Debian),那么在我安装可能会自己创建它的 Apache/Nginx 之前,它将阻止我为与 Apache/Nginx 不同的软件创建它,从而避免一些可能的冲突。

顺便说一句,我正在考虑将它用于 Ansible 和become: yes.

users debian nginx apache-httpd distributions

1
推荐指数
1
解决办法
4274
查看次数

HTTPd 显示 PHP 代码而不是执行它

我的设置:

# grep php /etc/httpd/conf/httpd.conf 
LoadModule php5_module  modules/libphp5.so
AddType x-httpd-php .php
AddHandler php5-script .php

# grep PHP /etc/httpd/conf/httpd.conf 
PHPIniDir /etc/

# grep open_tag /etc/php.ini 
; short_open_tag
short_open_tag = On

# /etc/init.d/httpd start
Starting httpd: [Tue Dec 04 03:26:29 2012] [warn] module php5_module is already loaded, skipping
httpd: apr_sockaddr_info_get() failed for holdsworth
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]

# cat /var/log/httpd/error_log 
[Tue Dec 04 03:26:37 2012] [notice] SELinux policy …
Run Code Online (Sandbox Code Playgroud)

centos php apache-httpd

0
推荐指数
1
解决办法
4万
查看次数

Apache 无法启动并且没有错误

Apache 不会启动。日记中没有错误。我在哪里可以找到更多信息?

$ systemctl status httpd.service -l
? httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2016-09-04 09:26:03 EDT; 2min 35s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 2303 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 2302 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 2302 (code=exited, status=1/FAILURE)
$ journalctl --dmesg
No journal files were found.
Run Code Online (Sandbox Code Playgroud)

centos apache-httpd

0
推荐指数
1
解决办法
5498
查看次数

标签 统计

apache-httpd ×10

centos ×3

debian ×2

ubuntu ×2

certificates ×1

cron ×1

distributions ×1

email ×1

grep ×1

https ×1

linux ×1

logs ×1

nginx ×1

performance ×1

php ×1

ssl ×1

users ×1