我安装了一个安装了Apache 2.4.6的CentOS 7 Box,在安装Apache之后,我可以通过IP地址访问默认页面,但是在添加虚拟主机之后,我无法访问默认页面或索引。 PHP 检查清单 – 我已经设置了我的根文件夹的所有权限,做775,777和755,但它的没有用户。 我的根文件夹的用户是axis:axis,它不是apache:apache或者axis:apache 我曾尝试访问.html和.php文件,但没有帮助 我尝试在http.conf中创build一个目录项,但它也没有工作 这是我的虚拟主机条目 – <VirtualHost *:80> <IfModule sapi_apache2.c> php_admin_flag engine on </IfModule> <IfModule mod_php5.c> php_admin_flag engine on </IfModule> ServerAdmin [email protected] ServerName www.demosite.com ServerAlias www.demosite.com ServerRoot /home/axis/public_html DocumentRoot /home/axis/public_html <Directory /home/axis/public_html> Header set Access-Control-Allow-Origin "*" Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> #LogLevel info […]
我有一个使用Apache 2.4运行Ubuntu 14.04的Amazon EC2实例。 我已经为Apacheconfiguration了3个虚拟主机,全部仅用于HTTPS。 问题是,当我尝试从互联网上访问Web服务器时,不知何故主机名会丢失,而且Apache会尝试从默认主机提供页面,而不pipe我通过哪个主机名访问它。 /etc/apache2/sites-enabled/default-ssl.conf: <VirtualHost *:80> ServerName monitor.mydomain.net Redirect / https://monitor.mydomain.net </VirtualHost> <VirtualHost *:443> ServerAdmin webmaster@localhost ServerName monitor.mydomain.net DocumentRoot /usr/share/nagios3/htdocs <Directory /> Options FollowSymLinks AllowOverride None allow from all </Directory> <Directory /usr/share/nagios3/htdocs> Options Indexes FollowSymLinks MultiViews Options +ExecCGI AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3 ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3 […]
我已经使用ppa:ondrej/php repository将PHP从5.5更新到了5.6版的数字海洋液滴(Ubuntu 14.04)。 我也更新mod_php使用5.6。 从那时起,我的虚拟主机停止了工作。 我到达服务器时显示的是“Apache2 Ubuntu默认页面” – /var/www/html/index.html 。 这是在apache2.conf : # Include the virtual host configurations: IncludeOptional sites-enabled/*.conf 目录/etc/apache2/sites-enabled/ : total 8 drwxr-xr-x 2 root root 4096 Nov 1 08:31 ./ drwxr-xr-x 8 root root 4096 Nov 1 08:20 ../ lrwxrwxrwx 1 root root 35 Nov 1 08:20 000-default.conf -> ../sites-available/000-default.conf lrwxrwxrwx 1 […]
我们有一个新的主机,我们刚刚添加,并把一个新的虚拟机。 有一个红色的感叹号,错误的主机处理器状态。 它说检查硬件状态选项卡的更多细节,但没有太多。 这是一个戴尔PowerEdge R730。 虚拟机资源不足。 从VMWare的性能来看,CPU使用率从来没有超过80%。 有人可以帮我find问题吗? 我想避免一个物理服务器崩溃,并确保所有的处理器正常运行或没有更大的问题在这里。 感谢您的帮助!
我试图把4个域名连接到一台服务器上,尽pipe我从来没有和Apache的虚拟主机合作过,但我想我会试试看。 我做的是以下几点: 我创build了4个.conf文件,每个域名(example.com.conf,example.eu.conf)。 这些都是与类似的configuration加载: <VirtualHost *:80> ServerAdmin [email protected] ServerName www.example.com ServerAlias example.com # Indexes + Directory Root. DirectoryIndex index.html DocumentRoot /home/www/www.example.com/htdocs/ # CGI Directory ScriptAlias /cgi-bin/ /home/www/www.example.com/cgi-bin/ <Location /cgi-bin> Options +ExecCGI </Location> # Logfiles ErrorLog /home/www/www.example.com/logs/error.log CustomLog /home/www/www.example.com/logs/access.log combined 之后,我用a2ensite命令来启用所有的网站,我重新启动apache。 域名都有一个指向我的服务器IPv4的Alogging。 但是,在完成所有这些configuration之后,无论何时访问其中一个域,这些依然会显示默认的Apache启动页面(/ var / www /),而不是它们各自的索引。 我已经确定域名都在我的hosts文件中提到。 我该如何解决这个问题? 谢谢。
我有一个Ubuntu 16.04 VPS。 我使用Letsencrypt为我的SSL证书创build或创build证书时,他们问你是否想要简单或安全的访问。 安全意味着它将redirect到https,无论如何。 这在主页上工作,但它不能在子域上工作。 我没有redirect到https,我只是看到我的index.html什么只是Apache的默认页面。 那么我该如何解决这个问题呢? 我的虚拟主机: <VirtualHost *:80> ServerName school.luukwuijster.eu Redirect / https://school.luukwuijster.eu ServerAdmin webmaster@localhost DocumentRoot /var/www/html/school.luukwuijster.eu/public/ <Directory /var/www/html/school.luukwuijster.eu/public/> AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine on RewriteCond %{SERVER_NAME} =school.luukwuijster.eu RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] </VirtualHost> LE-SSL: <IfModule mod_ssl.c> <VirtualHost *:443> ServerName school.luukwuijster.eu ServerAdmin webmaster@localhost DocumentRoot /var/www/html/school.luukwuijster.eu/public/ <Directory […]
为了开发目的,我们希望从同一台计算机(本地主机,或更好的本地环路)和局域网访问dynamic虚拟主机。 这个子域名虚拟主机应该映射到给定的文件夹结构。 每个文件夹代表一个项目。 正如我想出的,这可以用%1来完成。 语法检查是可以的( apachectl -t和apachectl -S )。 而且,虚拟主机被我们的本地DNS服务器捕获。 这是完美的。 但是我的Apache 2.4 vhostconfiguration有些问题。 请参阅下面我的vhosts.conf : UseCanonicalName Off <VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents" ServerName localhost ServerAlias alpham.dev <Directory /> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName alpham.dev ServerAlias *.alpham.dev VirtualDocumentRoot "/Library/WebServer/vhosts/%1" <Directory /> Options Indexes […]
我已经在centOS上安装了httpd的pagespeed模块,最后我把它和http一起工作,但是我仍然没有设法指挥ssl,我添加了ssl cert目录path和.pempath,我可以说已经写好了一切。 我包含ModPagespeed 3次,在pagespeed.conf文件中包含2次,在顶部有一次,还有一次在下一个。 然后在vhost.conf的顶部。 真正的设置是在vhost.conf文件中设置的,这是错误的? 我有一个服务器托pipe几个网站,HTTP网站的工作,但不是HTTPS的。 看一看: ModPagespeed on # Attempt to load mod_version if it wasn't loaded or compiled in (eg on Debian) <IfModule !mod_version.c> LoadModule version_module /usr/lib64/httpd/modules/mod_version.so </IfModule> <IfVersion < 2.4> LoadModule pagespeed_module /usr/lib64/httpd/modules/mod_pagespeed.so </IfVersion> <IfVersion >= 2.4.2> # As default pagespeed.conf configuration uses old-style ACLs using # 'allow' and 'deny', we […]
我在我的apache2服务器上运行Gitlab和OpenProject都运行良好,但一旦启动Gitlab,OpenProject将响应一个错误,找不到目录。 我认为这可能与我的重写规则在gitlab的Vhost文件中这里都是conf文件 Gitlab.conf <VirtualHost *:80> ServerName euve252630.serverprofi24.de ServerSignature Off ProxyPreserveHost On <Location /> Order deny,allow Allow from all ProxyPassReverse http://127.0.0.1:8080 ProxyPassReverse http://euve252630.serverprofi24.de/ </Location> RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA] # needed for downloading attachments DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public </VirtualHost> openproject.conf Include /etc/openproject/addons/apache2/includes/server/*.conf <VirtualHost *:80> ServerName euve252630.serverprofi24.de DocumentRoot /opt/openproject/public ProxyRequests off # Can't use Location […]
我在Apache的子文件夹“子文件夹”中有一个应用程序,所以我可以使用一个URL,例如: https://example.com/subfolder/#/v2/login : https://example.com/subfolder/#/v2/login而不是https://example.com/#/v2/login 。 我在我的htdocs文件夹中的.htaccess文件中有以下内容: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteRule ^(?!subfolder/).* subfolder/$0 [L,NC] 问题是,即使对于我的服务器的根URL,它也在进行重写。 例如,如果我转到https://example.com/ ,我会在“子文件夹”中看到我的应用程序的主页。 我想这个重写规则只适用于“子文件夹”中的应用程序。 我也尝试把.htaccess文件放在“子文件夹”里,但是不起作用。