我试图让我的centOS7networking服务器可以被外部用户查看。 我已经添加我的公共IP地址到我的服务器使用: sudo nmtui编辑ens160 和我的虚拟主机文件如下所示: NameVirtualHost *:80 <VirtualHost 65.51.XXX.XXX> ServerAdmin [email protected] ServerName 65.51.XXX.XXX ServerAlias 65.51.XXX.XXX DocumentRoot /var/www/html/example.com/public_html/ <Directory "/var/www/html/example.com/public_html/"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> #ErrorLog /var/www/html/example.com/logs/error.log #CustomLog /var/www/html/example.com/logs/access.log combined </VirtualHost> 在我的httpd.conf中我添加了: Listen 65.51.XXX.XXX:80 当我从networking中的计算机或networking外的计算机inputIP地址时,我什么也没有得到。 这个服务器最终将主持更多的网站,如果这与什么导致问题有关。
我在我的web服务器上看到一些奇怪的行为。 试图让keeWeb接受来自不同服务器上的webDAV共享文件。 如果我想添加一个WebDAV文件,input的forms为: https://FQDN:8443/webdav/file.kdbx 我看到以下头(FF开发工具头 – >响应头): Access-Control-Allow-Origin:"*" Access-Control-Allow-Methods:"GET, HEAD, POST, PUT, OPTIONS, MOVE, DELETE, COPY, LOCK, UNLOCK" Access-Control-Allow-Headers:"origin, content-type, cache-control, accept, authorization, if-match, destination, overwrite" Access-Control-Allow-Credentials:"true" 但是,在networking标签我可以看到一个401:请求方法:选项状态代码:401未经授权 看起来像CORS头被添加,但重写不起作用。 我的Apacheconfiguration: <Directory /var/www/html/webdav> Header always set Access-Control-Allow-Origin * Header always set Access-Control-Allow-Headers "origin, content-type, cache-control, accept, authorization, if-match, destination, overwrite" Header always set Access-Control-Expose-Headers "ETag" Header […]
今天,我决定使用PHP-FPMtesting我的NextCloud安装为全局别名。 我目前使用mod_php7在/ var / www / cloud目录下有一个NextCloud工作实例作为别名,但是我希望切换到没有运气的PHP-FPM! 杰杰奥。 我目前的规格是: Ubuntu服务器16.04 ISPConfig 3.1.6 安装的PHP版本5.6 – 7.0和7.1 NextCloud 12.0.0 因为我想用PHP 7.0启用PHP-FPM,所以我在/etc/php/7.0/fpm/pool.d中用这个configuration文件创build了一个PHP-FPMconfiguration文件: [cloud] listen = /var/lib/php7.0-fpm/cloud.sock listen.owner = www-data listen.group = www-data listen.mode = 0660 user = www-data group = www-data pm = dynamic pm.max_children = 100 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 5 pm.max_requests = […]
我已经做了几个脚本,以便在我的数字海洋Debian机器上build立一个站点。 保护站点的脚本基本上只是创buildsites-availble可用文件,运行certbot命令,然后提示您重新启动Apache。 它的工作完美无瑕。 导致问题的脚本中的命令: sudo cerbot -d mywebsite.com 用–apache标志会引发同样的错误。 我得到的错误 Error while running apache2ctl configtest. Action 'configtest' failed. The Apache error log may have more information. AH00526: Syntax error on line 19 of /etc/apache2/sites-enabled/mywebsite.ca.conf: SSLCertificateFile: file '/etc/letsencrypt/live/www.mywebsite.ca/fullchain.pem' does not exist or is empty 参考文件 <IfModule mod_ssl.c> <VirtualHost *:80> ServerName mywebsite.ca DocumentRoot /var/www/html/mywebsite.ca Redirect permanent / […]
我在我的Digital Ocean Debian机器上build立了一个网站,就像我以前做过十几次一样。 这一次,当我访问http://example.com ,它redirect到https(我不知道如何或为什么),我得到一个“您的连接不安全”的浏览器错误,当我查看细节它说: example.com使用无效的安全证书。 该证书仅对以下名称有效: another.example.net , www.another.example.net 错误代码:SSL_ERROR_BAD_CERT_DOMAIN 我还没有为example.com设置SSL证书,但它试图使用其他SSL证书。 这是sites-enabled/example.com.conf文件 <VirtualHost *:80> ServerAdmin alan@localhost DocumentRoot /var/www/html/example.com ServerName example.com ServerAlias www.example.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine on RewriteCond %{SERVER_NAME} =www.example.com [OR] RewriteCond %{SERVER_NAME} =example.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] </VirtualHost> 为什么要使用其他证书?
在Apache 2.2中有mod dbd_modules-1.0.x,它允许你在SQL数据库中pipe理虚拟主机。 在Apache 2.4中是否有相当的function?
我有一个运行在Ubuntu 16.04 LTS上的Apache(2.4)web服务器和一个php(7.1)服务器。 我试图build立一个木偶清单,以在Apache服务器上创build一个虚拟主机,然后每当一个PHP服务器请求被networking服务器接收,Apache服务器将代理请求到PHP服务器,然后从文档中读取请求的页面根显示请求页面。 文档根目录由web服务器和php服务器共享。 在php服务器上设置了一个php fpm池来侦听端口9001上来自apache服务器的代理请求。当我运行“puppet agent -t”时,我没有得到任何错误,并且成功创build了虚拟主机。 一旦创build了虚拟主机,然后创build一个名为info.php的php文件,但是由于某种原因,当我打开一个浏览器并在url(example.com/info.php)中键入虚拟主机名时,页。 我在做什么错了? 下面是我使用的木偶清单。 class team::vhost { #Create the base web directory and the vhosts for the wesbite file { ['/var/wwws', '/var/wwws/web']: ensure => 'directory', } #Create non-ssl vhost apache::vhost { 'example.com non-ssl': #ensure => 'absent', servername => 'example.com', serveradmin => '[email protected]', serveraliases => [ 'www.example.com', ], […]
我有一个apache安装程序与以下V主机*:443是一个NameVirtualHost default server default.pegasustech.com.au (/etc/apache2/vhosts.d/1-default.conf:4) port 443 namevhost default.pegasustech.com.au (/etc/apache2/vhosts.d/1-default.conf:4) port 443 namevhost client.pegasustech.com.au (/etc/apache2/vhosts.d/client.pegasustech.com.au.conf:4) port 443 namevhost websys.pegasustech.com.au (/etc/apache2/vhosts.d/websys.pegasustech.com.au.conf:18) port 443 namevhost www.pegasustech.com.au (/etc/apache2/vhosts.d/www.pegasustech.com.au.conf:31) 我的Apache服务器有2个接口,一个内部和一个外部。 我想将websys.pegasustech.com.au的不同configuration绑定到接口,所以我将websys.pegasustech.com.au.conf的configuration文件从10.xxx:443和203.xxx:443两个副本 这工作,我得到了 VirtualHostconfiguration: 10.242.1.241:443 websys.pegasustech.com.au (/etc/apache2/vhosts.d/websys.pegasustech.com.au.conf:67) 203.111.76.130:443 websys.pegasustech.com.au (/etc/apache2/vhosts.d/websys.pegasustech.com.au.conf:18) *:443是NameVirtualHost default server default.pegasustech.com.au (/etc/apache2/vhosts.d/1-default.conf:4) port 443 namevhost default.pegasustech.com.au (/etc/apache2/vhosts.d/1-default.conf:4) port 443 namevhost client.pegasustech.com.au (/etc/apache2/vhosts.d/client.pegasustech.com.au.conf:4) port 443 namevhost www.pegasustech.com.au (/etc/apache2/vhosts.d/www.pegasustech.com.au.conf:31) […]
我有Web应用程序运行在本地主机上,并侦听端口5050.我想这个Web应用程序下的URL相对pathdomain.tld / page /应用程序 我试图使用mod_rewrite: <Location /page/app> RewriteEngine on RewriteRule .*$ http://127.0.0.1:5050/$1 [P,QSA,NE] </Location> 这将domain.tld / page / app重写为domain.tld / login,这不是我服务器上的有效URL。 是否有可能扭转重写? 我无法使用ProxyPassReverse,因为当我将请求代理到应用程序时,需要从URL中删除相对path。
我们似乎有一些与Apache的问题。 当我看到服务器状态时,我看到: Server Version: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 Server MPM: event Server Built: Apr 12 2017 21:03:28 Current Time: Saturday, 05-Aug-2017 13:51:51 CEST Restart Time: Friday, 04-Aug-2017 21:42:54 CEST Parent Server Config. Generation: 1 Parent Server MPM Generation: 0 Server uptime: 16 hours 8 minutes 56 seconds Server load: 0.18 0.07 0.06 Total accesses: 1188994 […]