Direct url-access to my projects on vmWare/Debian 6 / Apache2 from Windows 7

Direct url-access to my projects on vmWare/Debian 6 / Apache2 from Windows 7



I am a web-programmer and I was looking for a solution to host my local projects on Linux, working from Windows 7.



So I installed VMWare Workstation, and created a virtual machine with OS Debian 6 Squeeze. After that I configured the internet connection with NAT, setup apache2, mysql and php.



Now I can access my sites from Windows by IP "http://192.168.195.222/somepoject" or by hostname (I edited hosts file in Windows) "http://myvirt/somepoject" and all seems great. But the problem is that I want to access every project (for which I created a virtual host in Debian) directly by its hostname (hostname of virtual host), for example "http://someproject.local" instead of "http://192.168.195.222/someproject".




1 Answer
1



I thinks you want to have an absolute URL for each project on localhost.
If true, you can set any project on specific port.
For this, input this code in your httpd.conf :



For project one:


<VirtualHost 127.0.0.1:8080>
DocumentRoot /home/poject1
</VirtualHost>
Listen 127.0.0.1:8080



For project two:


<VirtualHost 127.0.0.1:9090>
DocumentRoot /home/poject2
</VirtualHost>
Listen 127.0.0.1:9090



Finally, you can access to project one with /home/poject1 root path, with this URL:


http://127.0.0.1:8080/



And you can access to project two with /home/poject2 root path, with this URL:


http://127.0.0.1:9090/



Thanks






Don't forget the hosts file, he is on Windows 7.

– Samantha P
Nov 25 '12 at 23:27






Hi, thank you for your solution! I configured httpd.conf like you said. Now i can access my project in debian by url 127.0.0.1:8080 but I still cannot access it from Windows by url 192.168.195.222:8080 What should I do?

– Void Floyd
Nov 26 '12 at 0:20




Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế