Jump to content
php.lv forumi

virtualhost


renathy

Recommended Posts

Vai nevarat lūdzu parādīt vienkāršu virtualhost izveidi uz localhost (teiksim ir localhost, ir mape c:/windows/wamp/www/myproject).

Nepieciešams, lai atvērtos c:/windows/wamp/www/myproject/public/index.php fails uz teiksim myproject.local

Nekādīgi neizdodas ,mainu vhosts, bet visu laiku aizeju uz localhost tā vietā lai uz projektu.

Apache restarts arī taisu.

 

Paldies.

Link to comment
Share on other sites

pašu hosts failu labo?

 

Man ir tā:

 

httpd-vhosts.conf

 

<VirtualHost *:80>
  DocumentRoot "C:\xxx\yyy"
  ServerName zzz.local
</VirtualHost>
<VirtualHost *:80>
  DocumentRoot "C:\xxx\www"
  ServerName qqqq.local
</VirtualHost>
...

 

un iekš faila drivers/etc/hosts

 

127.0.0.1     zzz.local
127.0.0.1     qqq.local

Link to comment
Share on other sites

Man nesanak, lai gan liekas, ka viss tapat. Aiziet uz localhost.

 

Fails: C:\wamp\bin\apache\Apache2.2.17\conf\extra\httpd-vhosts.conf

 

<VirtualHost *:80>

DocumentRoot "C:\wamp\www\vdtest"

ServerName test.local

</VirtualHost>

 

 

mape vdtest, tur ir tikai viens fails index.php

 

 

C:\Windows\System32\drivers\etc\hosts

127.0.0.1 test.local

 

 

Un man aiiziet uz localhost.

es jau nomocijos ar shito... :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...