There is Ubuntu 14.04 + Apache2 (+ PHP + mysql ...). The site is in var / www /. When connected via localhost or 127.0.0.1, everything works, if I enter ip in the address bar (say 150.147.146.150), everything works. As soon as I sit down at any PC on the network (say 150.147.146.149) and try to register 150.147.146.150 or 150.147.146.150:80 in the address bar of the browser, I do not receive a page, but only an error.

How to configure apache2 to access pages from the outside. I am interested in accessing localhost machines with apache from the outside? All PCs are on the same network and respond perfectly.

/ect/apache2/apache2.conf

ServerName myserver Include /etc/phpmyadmin/apache.conf ServerRoot "/etc/apache2" Mutex file:${APACHE_LOCK_DIR} default PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 # These need to be set in /etc/apache2/envvars User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} HostnameLookups Off ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn # Include module configuration: IncludeOptional mods-enabled/*.load IncludeOptional mods-enabled/*.conf # Include list of ports to listen on Include ports.conf <Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory> <Directory /usr/share> AllowOverride None Require all granted </Directory> <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted Allow from all </Directory> AccessFileName .htaccess <FilesMatch "^\.ht"> Require all denied </FilesMatch> LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent 

/etc/apache2/ports.conf

 Listen *:80 <IfModule ssl_module> Listen 443 </IfModule> <IfModule mod_gnutls.c> Listen 443 </IfModule> 

/etc/apache2/sites-enabled/000-default.conf

 <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /var/www/html> AllowOverride All </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> 

The hosts file has not changed

 127.0.1.1 $fqdn $hostname 127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 
  • one
    Attach another config to virtual hosts. - AseN
  • Already attached (000-default.conf) - Maxim Gugayev

0