| Author | 
  | 
AceScottie
 
 
  Joined: 30 Sep 2016 Posts: 4 Location: England, West Yorkshire
  | 
 Posted: Fri 30 Sep '16 15:57    Post subject: No Remote Connections Apache 2.4 + Debian | 
     | 
 
  | 
 
I have recently installed Debian Jessie on my NAS device.
 
I am trying to reconfigure apache for my webserver which i use for testing different sites and ideas.
 
 
Currently i can connect through my local network however i cannot connect through the internet from an external location.
 
 
Additionally i am getting some config errors when i try running apache2 --version which may be affecting the service.
 
 
Notes: This is a clean install of Debian and Apache2 (using apt-get method).
 
I have installed IP tables and set a rule for port 80.
 
Port 80 is correctly forwarded from my router.
 
The IP address of the device is 192.168.1.111 
 
Additionally, vsftpd, Samba mysql and php are installed (and working as they should as far as i can tell)
 
 
I have tried setting up a virtual host within apache2.conf (i have no httpd.conf file) which had no effect on remote connections.
 
 
virtual host settings:
 
 	  | Code: | 	 		  
 
<VirtualHost 192.168.1.111:80>
 
ServerAdmin webmaster@test.example.com
 
DocumentRoot /var/www/html/
 
ServerName Example
 
ErrorLog /var/www/error.log
 
TransferLog /var/www/access.log
 
</VirtualHost>
 
 | 	  
 
 
Errors from apache2 -- version
 
 	  | Code: | 	 		  
 
root@127:~# apache2 --version
 
[Fri Sep 30 14:50:52.708294 2016] [core:warn] [pid 2242] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
 
[Fri Sep 30 14:50:52.708839 2016] [core:warn] [pid 2242] AH00111: Config variable ${APACHE_PID_FILE} is not defined
 
[Fri Sep 30 14:50:52.709007 2016] [core:warn] [pid 2242] AH00111: Config variable ${APACHE_RUN_USER} is not defined
 
[Fri Sep 30 14:50:52.709083 2016] [core:warn] [pid 2242] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
 
[Fri Sep 30 14:50:52.709233 2016] [core:warn] [pid 2242] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
 
[Fri Sep 30 14:50:52.956288 2016] [core:warn] [pid 2242] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
 
[Fri Sep 30 14:50:52.957854 2016] [core:warn] [pid 2242] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
 
[Fri Sep 30 14:50:52.958035 2016] [core:warn] [pid 2242] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
 
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
 
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
 
root@127:~#
 
 | 	  
 
 
full apache2.conf
 
http://pastebin.com/SyUygyLj
 
 
Note: Fixed some typos in apache2.conf (did not affect function)
 
Including Iptables list for additional reference:
 
 	  | Code: | 	 		  
 
Chain INPUT (policy ACCEPT)
 
target     prot opt source               destination
 
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
 
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
 
 
Chain FORWARD (policy ACCEPT)
 
target     prot opt source               destination
 
 
Chain OUTPUT (policy ACCEPT)
 
target     prot opt source               destination
 
 
 | 	  
 
 
Thanks for any help   | 
 
  | 
| Back to top | 
 | 
maba
 
  
  Joined: 05 Feb 2012 Posts: 64 Location: Germany, Heilbronn
  | 
 Posted: Sat 01 Oct '16 21:35    Post subject:  | 
     | 
 
  | 
 
What does 
 
 	  | Code: | 	 		  
 
systemctl status apache2.service
 
 | 	  
 
tell you.
 
 
What about 
 
 	  | Code: | 	 		  
 
systemctl start apache2.service
 
 | 	 
  | 
 
  | 
| Back to top | 
 | 
AceScottie
 
 
  Joined: 30 Sep 2016 Posts: 4 Location: England, West Yorkshire
  | 
 Posted: Sat 01 Oct '16 22:22    Post subject:  | 
     | 
 
  | 
 
First command:
 
 	  | Code: | 	 		  
 
root@WDMyCloud:~# systemctl status apache2.service
 
Showing one /org/freedesktop/systemd1/unit/apache2_2eservice
 
Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1/unit/apache2_2eservice interface=org.freedesktop.DBus.Properties member=GetAll cookie=1 reply_cookie=0 error=n/a
 
● apache2.service - LSB: Apache2 web server
 
   Loaded: loaded (/etc/init.d/apache2)
 
  Drop-In: /lib/systemd/system/apache2.service.d
 
           └─forking.conf
 
   Active: active (running) since Sat 2016-10-01 13:31:59 BST; 6h ago
 
  Process: 3669 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
 
  Process: 3742 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
 
   CGroup: /system.slice/apache2.service
 
           ├─3756 /usr/sbin/apache2 -k start
 
           ├─3760 /usr/sbin/apache2 -k start
 
           ├─3761 /usr/sbin/apache2 -k start
 
           ├─3762 /usr/sbin/apache2 -k start
 
           ├─3763 /usr/sbin/apache2 -k start
 
           └─3764 /usr/sbin/apache2 -k start
 
Root directory /run/log/journal added.
 
Considering /run/log/journal/5f1d0e244c672cb2bffe767d5659627a.
 
Directory /run/log/journal/5f1d0e244c672cb2bffe767d5659627a added.
 
File /run/log/journal/5f1d0e244c672cb2bffe767d5659627a/system.journal added.
 
File /run/log/journal/5f1d0e244c672cb2bffe767d5659627a/system@df2cf6b467ea49ffa3c02039b27014d4-0000000000005962-00053dd11b5cc22d.journal added.
 
File /run/log/journal/5f1d0e244c672cb2bffe767d5659627a/system@df2cf6b467ea49ffa3c02039b27014d4-0000000000004f9b-00053dd09ed44da0.journal added.
 
Journal filter: (((OBJECT_SYSTEMD_UNIT=apache2.service AND _UID=0) OR (UNIT=apache2.service AND _PID=1) OR (COREDUMP_UNIT=apache2.service AND _UID=0 AND MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1) OR _SYSTEMD_UNIT=apache2.service) AND _BOOT_ID=0213999a5ed24a3eab831412df7ec8f5)
 
 
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
 
Root directory /run/log/journal removed.
 
Directory /run/log/journal/5f1d0e244c672cb2bffe767d5659627a removed.
 
mmap cache statistics: 87 hit, 3 miss
 
 
Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
 
 
 | 	  
 
 
Second Command:
 
 	  | Code: | 	 		  
 
Calling manager for StartUnit on apache2.service, replace
 
Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=StartUnit cookie=1 reply_cookie=0 error=n/a
 
Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=GetUnit cookie=2 reply_cookie=0 error=n/a
 
Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1/unit/apache2_2eservice interface=org.freedesktop.DBus.Properties member=Get cookie=3 reply_cookie=0 error=n/a
 
Warning: Unit file of apache2.service changed on disk, 'systemctl daemon-reload' recommended.
 
Adding /org/freedesktop/systemd1/job/1057 to the set
 
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobNew cookie=2 reply_cookie=0 error=n/a
 
Got D-Bus request: org.freedesktop.systemd1.Manager.JobNew() on /org/freedesktop/systemd1
 
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobRemoved cookie=5 reply_cookie=0 error=n/a
 
Got D-Bus request: org.freedesktop.systemd1.Manager.JobRemoved() on /org/freedesktop/systemd1
 
Got result done/Success for job apache2.service
 
 | 	 
  | 
 
  | 
| Back to top | 
 | 
AceScottie
 
 
  Joined: 30 Sep 2016 Posts: 4 Location: England, West Yorkshire
  | 
 Posted: Wed 05 Oct '16 17:40    Post subject:  | 
     | 
 
  | 
 
| Either this is a bad question or people are stumped. Can anyone give me some advice or should i try contacting the apache devs or something ? | 
 
  | 
| Back to top | 
 | 
admin Site Admin
  
  Joined: 15 Oct 2005 Posts: 706
 
  | 
 Posted: Thu 06 Oct '16 9:55    Post subject:  | 
     | 
 
  | 
 
| Be aware that this forum is primarily for Windows environments, and it is about Apache in general for other environments. So you must be lucky that a Debian user is around wanting to help. | 
 
  | 
| Back to top | 
 | 
AceScottie
 
 
  Joined: 30 Sep 2016 Posts: 4 Location: England, West Yorkshire
  | 
 Posted: Fri 07 Oct '16 9:06    Post subject:  | 
     | 
 
  | 
 
| Any help with this? | 
 
  | 
| Back to top | 
 | 
James Blond Moderator
  
  Joined: 19 Jan 2006 Posts: 7443 Location: EU, Germany, Next to Hamburg
  | 
 Posted: Tue 11 Oct '16 21:17    Post subject:  | 
     | 
 
  | 
 
What is the "Listen" set to? 
 
 
try Only 
 
 
Listen 80
 
 
and in your vhost 
 
 
do 
 
 
<VirtualHost *:80> | 
 
  | 
| Back to top | 
 |