I search for the very best apache configuration with this situation:

I've got a local server running Linux/Apache2.2 where I develop my projects. I've the next structure:

--- /srv/www/
    | --- project1.com
       |--- htdocs
       |--- log
    | --- project2.org
       |--- htdocs
       |--- log
    | --- project3.net
       |--- htdocs
       |--- log

I wish to create VirtualHost located in the 'local' domain with subdomains pointing to various projects so

http://local points to the root (/srv/www)

http://p1.local points to /srv/www/project1.com

http://p2.local points to /srv/www/project2.org

Simultaneously I'd like other machines within the network have the ability to see all them (if at all possible without adding records to hosts). Since my local machine is known as bender I must have the ability to access

p1.bender
p2.bender

etc.

And when possible, being able to view them from outdoors the neighborhood network

http://p1.external_ip
http://p2.external_ip

During the last one I would make use of a domain title rather than the general public ip

At this time VirtualHosts will work with this particular configuration:

default server

<VirtualHost *:80>
ServerName  localhost

# Indexes + Directory Root.
    DirectoryIndex index.php    
DocumentRoot /home/luso/www

<Directory /home/luso/www>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>


ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

Alias /doc "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

project 1

<VirtualHost *:80>
ServerName  www.project1.com
    ServerAlias p1.*

# Indexes + Directory Root.
    DirectoryIndex index.php    
DocumentRoot /home/luso/www/project1.com/htdocs
<Directory /home/luso/www/project1.com/htdocs>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

# Logfiles
    ErrorLog  /home/luso/www/project1.com/log/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

    CustomLog /home/luso/www/project1.com/log/access.log combined
</VirtualHost>

but simply basically define every subdomain within the host file like

127.0.0.1   p1.local
127.0.0.1   p2.local

Even when I define just

127.0.0.1   local

it does not work

I do not need every project to become accesible using the domain title. Which is the greatest config with this?

Thank you