The contents of the file / etc / hosts

127.0.0.1 localhost 127.0.1.1 asus-UX32A 127.0.2.1 smm 127.0.3.1 phpmyadmin 

Contents ext. httpd-vhosts.conf configurations

 <VirtualHost 127.0.0.1:80> ServerAdmin admin DocumentRoot "/home/asus/www/localhost/" ServerName localhost ServerAlias localhost ErrorLog "logs/localhost-error_log" CustomLog "logs/localhost-access_log" common </VirtualHost> <VirtualHost 127.0.2.1:80> ServerAdmin admin DocumentRoot "/home/asus/www/smm/" ServerName smm ErrorLog "logs/smm-error_log" CustomLog "logs/smm-access_log" common </VirtualHost> <VirtualHost 127.0.3.1:80> ServerAdmin admin DocumentRoot "/home/asus/www/phpmyadmin/" ServerName phpmyadmin ErrorLog "logs/phpmyadmin-error_log" CustomLog "logs/phpmyadmin-access_log" common </VirtualHost> 

But if you enter one of the addresses in the browser line, phpmyadmin or smm, then you still need to output the root directory / home / asus / www / WHAT I did not take into account? Thanks in advance for your reply

  • one
    All corrected, it turns out the config forgot to additional uncomment. PS with the uncommented config the same ip does not roll, so different ip are needed, otherwise it leads everyone to the first virtual host from the presented ones - rusbaron
  • Cover the topic. - BiMaWa

1 answer 1

<VirtualHost 127.0.3.1:80> and why are there so many IPs?

just try <VirtualHost *: 80>

  • Changed, restarted apache, still shows the main directory. - rusbaron
  • oh and in hosts, why are these different IPs, make it all 127.0.0.1 - BiMaWa
  • it definitely doesn’t work with one, all addresses are thrown into the www folder and don’t follow subfolders - rusbaron