About Virtual Host config

Hi to All,

In my httpd.conf I have create:

<VirtualHost *:85>
DocumentRoot "/usr1/www"
ServerName www.mydomain.lan
<Directory "/usr1/www/myapp">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
Options +Indexes
</Directory>
ErrorLog /usr1/zend/apache2/logs/mydomain-error.log
LogLevel emerg
CustomLog /usr1/zend/apache2/logs/mydomain-access.log "combined"
ServerSignature Off
</VirtualHost>

Now if I enter in the browser http://www.mydomain.lan:85/myapp, my PHP page is displayed and all work fine.

My question is:
Isi it possible modify the code in order to open my app with a link like www.mydomain.lan, instead the previous full path ?
If yes, how must modify my code ?

Thank You and Best Regards
Gaetano

Change

DocumentRoot "/usr1/www"

to

DocumentRoot "/usr1/www/myapp"

Dan,

That won’t be successful.

Nick,

No, it looks like you’ve installed Apache on port 85 rather than 80 so you MUST use port 85 to access your localhost. Since you’re using a 'nix box rather than WinDoze, I wonder why you did that (WinDoze boxes, like mine, come with IIS preinstalled on port 80 so it must be shut down and its properties set to manual start before installing Apache on port 80).

Once past that problem, Dan’s solution will work.

Regards,

DK

Thank You to All,

I have modified in httpd.conf

Listen 80
------
ServerName 127.0.0.1:80
------
<VirtualHost *:*>
DocumentRoot "/usr1/www/myapp"
--------

And with these changes I be able to run my app with http://www.myapp.lan only

Bye
Gaetano

Nick,

Thank you for that feedback. On WinDoze boxes, I’ve had to remove and reinstall Apache to get the “service” to register to port 80. I’m glad that Linux does that correctly … and directly!

Regards,

DK