Articles of apache2

通过Kerberized NFSv4 mount的Apache userdir:禁止访问

我已经build立了一个专门的网页开发学习实用的房间。 用户帐户由Samba 4 ADpipe理,用户文件存储在中央NFS服务器上,导出由Kerberos进行证实。 一切正常: 用户可以通过Kerberos进行身份validation(并在login时收到一张票) 家庭使用NFS4(sec = krb5) 权利正确地适用于所有域用户 但是,我需要在每个客户端上安装一个localhost-only的服务器(用php和其他东西),并激活userdir。 我爬了互联网,但似乎只有极less数人与我处于同一个configuration。 我试过所有我发现像创build一个SPN和一个Apache专用密钥表: # samba-tool spn add HTTP/client1.domain client1$ # samba-tool domain exportkeytab httpclient1.keytab –principal=HTTP/client1.domain 并在client1上的/ etc / apache2中导出这个生成的keytab,但是如果我尝试在此keytab上执行kinit:#kinit -k -t /etc/apache2/client1http.keytab HTTP / client1.domain kinit:Client“HTTP / client .domain @ REALM“在获取初始凭据时未在Kerberos数据库中find keytab似乎是正确的: # klist -kt /etc/apache2/client1http.keytab KVBO Timestamp Principal —- ——————- —————————- 4 29/07/2016 16:12:38 […]

如何解决Apache2 w / suPHP扫描正确的.ini目录?

Apache2正在读取/ etc / php5 / apache2中的php.ini的正确区域,直到suPHP被添加到系统。 在/etc/apache2/mods-available/suphp.conf中configurationsuPHP_ConfigPath将加载正确的php.ini,但不会更正要扫描的目录。 我如何以及在哪里修复这个问题,以便Apache从/ etc / php5 / apache2目录加载/扫描/使用PHP? 编辑1:这也打破了“应用程序/ x-httpd-php”,特别是localhost / phpmyadmin /。 Edit2: 运行phpmyadmin和suphp可以解决phpMyAdmin和其他所有使用/ usr / share /的问题。 ==== michael@local [~/public_html]# pwd /home/michael/public_html michael@local [~/public_html]# alias relub alias relub='cat /etc/os-release && uname -a' michael@local [~/public_html]# relub NAME="Ubuntu" VERSION="14.04.5 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.5 LTS" VERSION_ID="14.04" HOME_URL="www.ubuntu.com/" SUPPORT_URL="help.ubuntu.com/" […]

让我们encryption自动redirect到HTTPS不起作用

我已经在我的小Ubuntu服务器上设置了让我们encryption,并将其用于所有非IDN网站上。 它可以select自动将HTTP站点redirect到HTTPS。 我select了这个选项。 Let's Encrypt守护程序向每个域conf添加了三行,并为每个域创build了一个新的domain-le-ssl.conf。 这里是timothy.green.name.conf : <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header […]

有什么顶级的实时HTTPstream量分析实用工具吗?

接近实时也没关系,我想可以通过不断parsing访问日志,并显示实时状态,如大多数请求的文件,顶级远程IP。 我听说过这些工具,但不记得它的名字。 任何人都知道?

Xenial中的libapache2-mod-macro发生了什么?

我们的服务器堆栈非常依赖Apache的Macro mods。 在以前的发行版(即Ubuntu Trusty Tahr,14.04)中,该function出现在libapache2-mod-macro软件包中。 但是这个包已经从Xenial(Ubuntu 16.04)中消失了。 有谁知道发生了什么事? 它是否移动或归入不同的包?

将子域redirect到用户configuration文件

我想要将所有子域redirect到用户configuration文件,例如: redirect这个URL: http://alexusername.example.com : http://alexusername.example.com 要: http://alexusername.example.com : http://alexusername.example.com 但是显示的内容是: http://example.com/user.php?q=alexusername : http://example.com/user.php?q=alexusername 我的意思是我想显示http://example.com/user.php?q=alexusername的内容而不改变浏览器中的URL我希望它仍然http://alexusername.example.com 我试过这个: <IfModule mod_rewrite.c> Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteCond %{HTTP_HOST} !www.blackhawk.site$ [NC] RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).blackhawk.site [NC] RewriteRule ^(.*)$ http://blackhawk.site/user.php?q=%2 [L] </IfModule>

这个WordPress的.htaccess规则是什么?

在WordPress 4.7多站点子域安装的默认.htaccess规则中,我试图理解一个特定规则的目的。 首先我会自己提出这个规则 RewriteRule ^(wp-(content|admin|includes).*) $1 [L] 在我看来,这个规则似乎只是简单地将wp-content或者wp-admin或者wp-includes中的任何url重写到自己。 由于它是在文件系统检查之后发生的,我们知道它在文件系统上不存在,所以我不知道它要做什么。 现在这里是整个build议的.htaccess文件。 这条规则从结尾第三。 RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L] 任何人都可以摆脱的任何洞察力都是太棒了。 我收到一个错误 […]

连接被拒绝HTTP(端口80)

所以,在Apache和Ubuntu方面,我是一个新手,但我知道基本知识(文件移动,复制,编辑等)。 我试图用PHP的权限来解决一个问题,所以我使用chmod将/tmp/和/var/tmp/权限设置为777。 然后,我修改了/etc/php/和/etc/php5/两个php.ini文件,以定制临时目录。 但是,我结束了重新启动服务器,而实际上并没有创build临时目录(oops)。 现在我仍然可以通过SFTP连接到我的服务器,但是在Chrome中尝试连接时,它给了我一个ERR_CONNECTION_REFUSED 。 我以为这是一个.php页面的问题,所以我尝试加载一个.html页面。 没有。 我尝试了多次重新启动,但无济于事。 另外,我的整个文件系统是只读的。 所以我假设我搞砸了一些configuration和作为安全措施,一切都被locking。 我已经尝试sudo su ,重新安装驱动器(被阻止,因为我不能写入一些configuration文件),和一堆其他的东西。 在执行fsck时我也遇到错误: fsck.ext4: unable to resolve UUID: xxxxxxxx 。 同样,不能通过重新安装来自动修复任何错误,因为我不能写入某个configuration文件。 我尝试通过/var/log/系统日志,但是我找不到任何错误消息。 我相信这是一个PHPconfiguration的问题,但我不知道。 我也看着我的UFW,看到它被禁用。 当试图启用它,再次,它不会让我,因为我不能写入文件系统。 所有这一切都在sudo 。 帮助将不胜感激。 谢谢! 编辑:我设法find我的bash历史作为根,但没有什么似乎太奇怪: https : //pastebin.com/yPh5rSE6 编辑2:我记得的一件事是修改/var/tmp/权限时,该文件夹有一个粘性位; 我相信权限是drwxrwxrwt 。 正在改变这个服务器突破失误? 我不能改变这个,因为我作为只读文件系统挂载。 编辑3:所以这似乎是问题是权限,这导致启动时出现错误,并locking文件系统为只读,搞乱了Web服务器。 这听起来似乎有道理? 这个问题似乎根植于两个地方fsck和mount的UUID错误。 我如何解决这个问题?

在Rails上运行多个ruby web应用程序,而无需一直修改/添加<Directory>

我想要做的是在一个Apache目录中创build多个Ruby应用程序,当我去http:// localhost / appname时 ,ruby应用程序没有问题就解决了。 不过,我想dynamic地这样做,所以我不必在每次创build新应用程序时在apache.conf中添加一个新的<Directory> 。 我希望它是像Apache中的PHP,你只需要在目录中放置多个应用程序,并且http:// localhost / appname显示应用程序 的apache.conf <VirtualHost *:80> UseCanonicalName Off ServerName localhost ServerAlias localhost ServerAdmin webmaster@localhost VirtualDocumentRoot /var/www/html/*/public ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/*/public> Require all granted Options Indexes FollowSymlinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> 如果我将文档根目录和目录设置为应用程序的完整path,那么一切正常,但是我想使其成为dynamic的。 这甚至有可能吗? 如果是这样,你能提供一些帮助吗? 谢谢!

Apache-Ubuntu:无法使用IP地址访问我的网站

我有一个运行在Ubuntu 16.04 vps的Apache网站。 最近我无法使用其IP地址访问主网页。 请帮我debugging我的服务器configuration。 主site.conf: <VirtualHost *:80> ServerAdmin [email protected] ServerName XXXX DocumentRoot /var/www/html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> apache2.conf包含: … <Directory /> Options FollowSymLinks AllowOverride all </Directory> <Directory /usr/share> AllowOverride all </Directory> […]