English
Ask Your Question

Revision history [back]

Run Apache Virtualhost on different port

Hi guys,
Recently I configured my httpd on Fedora 20, everything's ok.
But I want to run a virtualhost on different port, for example 8081 This is my apache config:

Listen 8081
NameVirtualHost *:8081

<VirtualHost *:8081>
   DocumentRoot /var/www/html/web
   ServerName web
</VirtualHost>

When a restart httpd on console:

$ sudo service httpd restart
Redirecting to /bin/systemctl restart 
httpd.service Job for httpd.service
failed. See 'systemctl status
httpd.service' and 'journalctl -xn'
for details.

When check the httpd status:

$ systemctl status httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since dom 2014-01-05 13:33:04 PET; 2min 29s ago
  Process: 12349 ExecStop=/bin/kill -WINCH $MAINPID (code=exited, status=1/FAILURE)
  Process: 3492 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 12345 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 12345 (code=exited, status=1/FAILURE)
   Status: "Total requests: 247; Current requests/sec: 0; Current traffic:   0 B/sec"

ene 05 13:33:04 localhost.localdomain kill[12349]: -q, --queue <sig>      use ...
ene 05 13:33:04 localhost.localdomain kill[12349]: -p, --pid              prin...
ene 05 13:33:04 localhost.localdomain kill[12349]: -l, --list [=<signal>] list...
ene 05 13:33:04 localhost.localdomain kill[12349]: -L, --table            list...
ene 05 13:33:04 localhost.localdomain kill[12349]: -h, --help     display this...
ene 05 13:33:04 localhost.localdomain kill[12349]: -V, --version  output versi...
ene 05 13:33:04 localhost.localdomain kill[12349]: For more details see kill(1).
ene 05 13:33:04 localhost.localdomain systemd[1]: httpd.service: control proc...1
ene 05 13:33:04 localhost.localdomain systemd[1]: Failed to start The Apache ....
ene 05 13:33:04 localhost.localdomain systemd[1]: Unit httpd.service entered ....
Hint: Some lines were ellipsized, use -l to show in full.

Then I open the port 8081 on firewall, so here a screenshot
image description

Any ideas?

Run Apache Virtualhost on different port

Hi guys,
Recently I configured my httpd on Fedora 20, everything's ok.
But I want to run a virtualhost on different port, for example 8081
This is my apache config:

Listen 8081
NameVirtualHost *:8081

<VirtualHost *:8081>
   DocumentRoot /var/www/html/web
   ServerName web
</VirtualHost>

When a restart httpd on console:

$ sudo service httpd restart
Redirecting to /bin/systemctl restart 
httpd.service Job for httpd.service
failed. See 'systemctl status
httpd.service' and 'journalctl -xn'
for details.

When check the httpd status:

$ systemctl status httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since dom 2014-01-05 13:33:04 PET; 2min 29s ago
  Process: 12349 ExecStop=/bin/kill -WINCH $MAINPID (code=exited, status=1/FAILURE)
  Process: 3492 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 12345 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 12345 (code=exited, status=1/FAILURE)
   Status: "Total requests: 247; Current requests/sec: 0; Current traffic:   0 B/sec"

ene 05 13:33:04 localhost.localdomain kill[12349]: -q, --queue <sig>      use ...
ene 05 13:33:04 localhost.localdomain kill[12349]: -p, --pid              prin...
ene 05 13:33:04 localhost.localdomain kill[12349]: -l, --list [=<signal>] list...
ene 05 13:33:04 localhost.localdomain kill[12349]: -L, --table            list...
ene 05 13:33:04 localhost.localdomain kill[12349]: -h, --help     display this...
ene 05 13:33:04 localhost.localdomain kill[12349]: -V, --version  output versi...
ene 05 13:33:04 localhost.localdomain kill[12349]: For more details see kill(1).
ene 05 13:33:04 localhost.localdomain systemd[1]: httpd.service: control proc...1
ene 05 13:33:04 localhost.localdomain systemd[1]: Failed to start The Apache ....
ene 05 13:33:04 localhost.localdomain systemd[1]: Unit httpd.service entered ....
Hint: Some lines were ellipsized, use -l to show in full.


Then I open the port 8081 on firewall, so here a screenshot

image description

Any ideas?

Run Apache Virtualhost on different port

Hi guys,
Recently I configured my httpd on Fedora 20, everything's ok.
But I want to run a virtualhost on different port, for example 8081
This is my apache config:

Listen 8081
NameVirtualHost *:8081

<VirtualHost *:8081>
   DocumentRoot /var/www/html/web
   ServerName web
</VirtualHost>

When a restart httpd on console:

$ sudo service httpd restart
Redirecting to /bin/systemctl restart 
httpd.service Job for httpd.service
failed. See 'systemctl status
httpd.service' and 'journalctl -xn'
for details.

When check the httpd status:

$ systemctl status httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since dom 2014-01-05 13:33:04 PET; 2min 29s ago
  Process: 12349 ExecStop=/bin/kill -WINCH $MAINPID (code=exited, status=1/FAILURE)
  Process: 3492 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 12345 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 12345 (code=exited, status=1/FAILURE)
   Status: "Total requests: 247; Current requests/sec: 0; Current traffic:   0 B/sec"

ene 05 13:33:04 localhost.localdomain kill[12349]: -q, --queue <sig>      use ...
ene 05 13:33:04 localhost.localdomain kill[12349]: -p, --pid              prin...
ene 05 13:33:04 localhost.localdomain kill[12349]: -l, --list [=<signal>] list...
ene 05 13:33:04 localhost.localdomain kill[12349]: -L, --table            list...
ene 05 13:33:04 localhost.localdomain kill[12349]: -h, --help     display this...
ene 05 13:33:04 localhost.localdomain kill[12349]: -V, --version  output versi...
ene 05 13:33:04 localhost.localdomain kill[12349]: For more details see kill(1).
ene 05 13:33:04 localhost.localdomain systemd[1]: httpd.service: control proc...1
ene 05 13:33:04 localhost.localdomain systemd[1]: Failed to start The Apache ....
ene 05 13:33:04 localhost.localdomain systemd[1]: Unit httpd.service entered ....
Hint: Some lines were ellipsized, use -l to show in full.


Then I open the port 8081 on firewall, so here a screenshot

image description

Any ideas?