skip to Main Content

I have setup my apache conf file, as per instructions here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-7

I am running RHEL 7.

I added:

IncludeOptional sites-enabled/*.conf

My sites-enabled folder has a fusio.conf file as below:

<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>
~

However when I connect to server.mycompany.net:8080, I do not get a response. This site can’t be reached

I can connect directly to server.mycompany.net and see the files in the fusio folder, but what am I missing?

I have added Listed 8080 to the conf file.

2

Answers


  1. You may not have opened the port on your firewall (probably iptables or firewalld).

    From the server itself, perform the following:

    $ curl --header "Host: server.company.net" http://127.0.0.1:8080/
    

    If you get a response, that means apache is running, but your firewall to the internet is not letting it through on port 8080.


    firewalld

    Check to see if you are running firewalld

    # firewall-cmd --state
    

    If the response is running, let’s add it

    # firewall-cmd --permanent --zone=public --add-port=8080/tcp
    # firewall-cmd --reload
    

    iptables

    Check to see if you are using iptables (iptables are kernel modifications, so there is no "service" that is running. if rules are showing, they are enabled.)

    # iptables -L
    

    If you see rules, then lets add another.

    # iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
    
    Login or Signup to reply.
  2. Check /etc/apache2/ports.conf. You need to specify ports there.

    Listen 80
    Listen 8080
    ……

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search