我已经设置了我的apache conf文件,按照下面的说明:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-7
我正在运行RHEL 7。
我又道:
IncludeOptional sites-enabled/*.conf
我的站点启用文件夹有一个fusio.conf文件,如下所示:
<VirtualHost *:8080>
ServerName server.company.net
DocumentRoot /var/www/html/fusio/public
<Directory /var/www/html/fusio/public>
Options FollowSymLinks
AllowOverride All
Require all granted
# rewrite
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php/$1 [L]
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
</Directory>
# log
LogLevel warn
# ErrorLog ${APACHE_LOG_DIR}/fusio.error.log
# CustomLog ${APACHE_LOG_DIR}/fusio.access.log combined
</VirtualHost>
~
但是,当我连接到server.mycompany.net:8080时,我没有得到响应。
我可以直接连接到server.mycompany.net并查看fusio文件夹中的文件,但我遗漏了什么?
我已将Listed 8080添加到conf文件中。
2条答案
按热度按时间dz6r00yl1#
您可能尚未打开防火墙上的端口(可能是
iptables
或firewalld
)。从服务器本身执行以下操作:
如果你得到一个响应,这意味着apache正在运行,但你的防火墙到互联网是不允许它通过端口8080。
防火墙
检查是否正在运行
firewalld
如果响应为
running
,我们将其相加个iptables
检查您是否正在使用
iptables
(iptables是内核修改,因此没有正在运行的“服务”。如果显示规则,则它们已启用。)如果您看到规则,则让我们添加另一个。
wh6knrhe2#
检查/etc/apache 2/ports. conf。您需要在此处指定端口。
听80听8080......