我试图设置php5.6.23作为我的服务器上使用php7作为主版本的快速CGI 但在我的一个领域,我得到这个错误: The requested URL / was not found on this server. 这里是我的虚拟主机conf: ScriptAlias / /usr/lib/cgi-bin DocumentRoot "/home/ue4xxxx/www" <Directory "/home/ue4xxxx/www"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all AddHandler php-cgi .php Action php-cgi /cgi-bin/php-cgi-5.6.23 <FilesMatch "\.php*"> SetHandler php-cgi </FilesMatch> </Directory> ErrorLog ${APACHE_LOG_DIR}/ue4/error.log CustomLog ${APACHE_LOG_DIR}/ue4/access.log combined 我有php cgi bin位于/usr/lib/cgi-bin ,我想使用vhost root /home/ue4xxxx/www […]
我最近得到我的apache error.log一长串: [Thu Jun 30 13:03:22.005214 2016] [:error] [pid 15759] [client xx.xx.xxx.xxx:xxxxx] script '/var/www/html/myiphb.php' not found or unable to stat [Thu Jun 30 13:03:27.164111 2016] [:error] [pid 15644] [client xx.xx.xxx.xxx:xxxxx] script '/var/www/html/myiphb.php' not found or unable to stat [Thu Jun 30 13:03:32.314190 2016] [:error] [pid 15757] [client xx.xx.xxx.xxx:xxxxx] script '/var/www/html/myiphd.php' not found or unable to […]
客户使用Apache HTTP Web服务器( AW )将HTTP请求redirect到Apache Tomcat( AT )。 我需要为AT服务的当前应用程序添加一个特殊的servlet。 这个servlet只会启动一个线程而不做任何事情。 这个线程的唯一目的是侦听传入的TCP连接。 是否有可能将通过AW收到的入站TCP连接redirect到AT ? 所以AW只会作为一个TCP代理。 我更喜欢代理解决scheme,隧道是不可取的,但如果没有其他解决scheme,我会考虑。 我无法控制客户端,期望我遵循严格的基于文本的自定义协议。 [传入连接] Client -> AW -> AT [响应] Client <- AW <- AT
我有一个新的Ubuntu 14.04安装与采取以下步骤: Apache2 2.4.7 MariaDB上一个稳定的版本 PHP 7.0.9(和几个模块) Apacheconfiguration为使用PHP7-FPM * 使用Apache2的mod_rpaf ** PHPMyAdmin 4.6.3与PHP7.0.9正常工作。 WordPress 4.6 *** 清漆4.0 Nginx 1.10.1在/etc/nginx/ssl中带有ssl证书 和** – >问题发生在这些configuration之前和之后*** – > wp-config.php有强制ssllogin和ssl admin的代码。 两个工作都很好,只有Apache / Varnish。 为Apache创build了一个SSL证书,如果Apache设置为侦听端口443,则一切正常。 这是我的/etc/apache2/ports.conf: #NameVirtualHost 192.168.1.86 ServerName 192.168.1.86 Listen 8080 #<IfModule ssl_module> # Listen 443 #</IfModule> #<IfModule mod_gnutls.c> # Listen 443 #</IfModule> # vim: syntax=apache ts=4 sw=4 sts=4 […]
使用vhosts和letsencrypt证书运行Apache 2.4.7(Ubuntu 14.04)。 许多虚拟主机运行WordPress创build一个.htaccess文件。 我已经排除了这些.htaccess文件中的.well-known文件夹,但是定期更新WordPress或插件来擦除这些手动修改。 在每个虚拟主机下RewriteEngine off这个文件夹的RewriteEngine off会更好,但是这样做很困难,因为在<Location>指令下这样做是不被支持的。 从我所看到的<Directory>指令必须是特定的而不是相对的? 我有什么select? 鉴于我在Apache 2.4.7我可以活着添加RewriteOptions Inherit到每个虚拟主机configuration。 但是想避免为每个虚拟主机添加定制的configuration。
我试图在Ubuntu 15.04上使用mod_rewrite for Apache映射任何URL,例如localhost/first到localhost/first.php 。 这是步骤。 使用(apt-get apache2,php5)安装Apache2,PHP5在Apache中启用PHP,所以phpinfo()打印适当的信息。 a2enmod重写,重启apache 在/etc/apache2/sites-enabled/000-default.conf ,在适当的位置添加以下内容。 <VirtualHost *:80> <Directory /var/www/html> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> — Restart Apache /var/www/html .htaccess , RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^\.]+)$ $1.php [NC,L] chmod 644 /var/www/html/.htaccess 重新启动Apache 但像/localhost/second这样的请求不会转换为second.php 。 编辑.htaccess ,最后一行改为RewriteRule ^second$ […]
我使用安装了apache2和php7的Windows 10下的bash。 我为http:// localhost设置了一个虚拟主机映射到链接到物理窗口目录的符号文件。 当我打开url时,它无限地追加/index.html/到url,无论我input的是哪个子目录,无论url中有(现有)文件,如下所示: http://localhost/pub/videos/viewsSimilarities_movie.mp4 导致: http://localhost/pub/videos/viewsSimilarities_movie.mp4/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/ 和 http://localhost/pub/ 导致: http://localhost/pub/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/ 我的/etc/apache2/sites-available/localhost.conf: <VirtualHost *:80> ServerName localhost DocumentRoot /var/www/html DirectoryIndex index.html <Directory /var/www/html> # Options +Indexes +FollowSymLinks +MultiViews AllowOverride None Order allow,deny allow from all RewriteEngine Off </Directory> ErrorLog /var/log/apache2/localhost_error.log LogLevel debug CustomLog /var/log/apache2/localhost_access.log combined # phpMyAdmin default Apache configuration Alias /phpmyadmin /var/www/phpmyadmin <Directory /var/www/phpmyadmin> […]
我有一个虚拟的Kali Linux机器(由Debian构build),它通过MacBook Air上的Parallels 10运行。 在过去的几个月中,我一直在试图学习networking安全工具的基本知识,现在我正试图通过使用命令“service apache2 start”来build立一个apache2 web服务器。 好吧,它工作正常,我可以查看我放在/ var / www / html目录中的index.html文件。 问题是,我只能在虚拟机和主机Mac上查看它,即使它应该可以通过LAN访问所有设备。 我的Apache IP是类似于10.211.xx.x. 我希望能够在其他设备上从我的LAN上查看网页,但是我只能看到“错误:连接被拒绝”。 我有Parallel的networking设置设置为共享模式,我猜这是与外部设备不允许连接有关,但我甚至不知道从哪里开始解决这个问题,没有什么在网上search提供了答案; 而且我最后一次问这个问题,它被搁置了。 对于这一切,我还是个新手,所以我很抱歉,如果这是一个明显的问题,但我没有别的select,只能问专业人士。 任何帮助都不胜感激。
机 我在Azure中创build了一个虚拟机(经典)。 运行Ubunu 16.04 LTS。 它在云端托pipe。 云服务(经典) 虚拟主机 安装了Apache2 安装了我所需的PHP版本 我基于PHP的应用程序运行良好 我可以通过浏览器通过互联网(我必须在terminal设置中打开端口80) 数据库 在Azure中创build一个MySQL数据库 工作正常 如果我从WampServer localhost运行PHP应用程序,则PHP应用程序可以访问数据库(在Azure中托pipe)。 问题 当PHP应用程序在云中运行时,PHP应用程序无法访问数据库。 我想这个问题可能与端点有关 但是我打开了一些仍然不工作(也重新启动Apache2) 我打开的端点: 22:用SSH到达机器 80:允许网页浏览器到达它 3306:MySQL DB的属性页面显示这个端口 1433:只是我在互联网上阅读 3389:只是我在互联网上阅读 帮帮我 你看到我在做什么错了吗? 你能提出一些build议吗?
我有一个Yii 1.1的标准.htaccess,我添加了基于http的授权。 当我添encryption码保护时,重写条件RewriteCond %{REQUEST_FILENAME} !-f停止工作,现在静态文件请求通过index.php处理 但实际上密码保护也不起作用,我可以不input任何login数据,点击login,或者点击取消,网站就会显示出来。 这里可能会发生什么? 我尝试了每个选项来解决密码文件,使用完整的path,使用〜相对path,和当前目录相对path在这里的代码,但都没有工作。 我用一个在线工具创build了.htpasswd文件,我相信它是可以的,但如果格式不正确,是不是应该阻止访问而不是授予它? 我怎么得到一个密码,没有给出,然后让我走了吗? 的.htaccess: AuthType Basic AuthName "Authorreach Staging" AuthUserFile .htpasswd Require valid-user # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # — Lines relevant to this question end here (I think) — # For security reasons, Option followsymlinks […]