login  Naam:   Wachtwoord: 
Registreer je!
 Forum
Zoeken  Regels  Help
Categorieën > Object georiënteerd

[ZF] DocumentRoot pad werkt niet goed in httpd.conf (Windows) (Opgelost)

Erwin1976 – 11/12/2011 20:28 (Laatst gewijzigd op 11/12/2011 22:12)
Hoi iedereen,

Kan iemand misschien zien waarom het DocumentRoot pad niet goed werkt in de httpd.conf?

Groeten Erwin

  1. NameVirtualHost *:80
  2. <VirtualHost *:80>
  3. DocumentRoot "C:/Program Files(x86)/Zend/Apache2/htdocs/ZendFramework/public"
  4. ServerName ZendFramework.localhost
  5. </VirtualHost>



8 antwoorden

Gesponsorde links

vinTage – 11/12/2011 20:37
Dat ziet er eerder uit dan de httpd-vhost.conf ipv httpd.conf

Erwin1976 – 11/12/2011 21:11 (Laatst gewijzigd op 11/12/2011 21:14)
Ik heb n.a.v. een tutorial dit stukje script erbij gezet in de httpd.conf. Wel in het goeie bestand volgens mij onder de directory Apache2\conf\

Moet ik misschien ergens nog iets anders doen, bijvoorbeeld bij mijn systeemvariabelen een "path" toevoegen?


Define Virtual Host Settings
To make it easier to access the application, it’s a good idea to define a new virtual Web host
and point it to the application’s public directory. This is an optional but recommended step,
as it helps simulate a “live” environment and presents application resources (URLs) as they
would appear to users in a public environment.
Assuming you’re using the Apache Web server, you can set up a named virtual host for
the application by editing the Apache configuration file (httpd.conf or httpd-vhosts.conf) and
adding the following lines to it:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/usr/local/apache/htdocs/square/public"
ServerName square.localhost
</VirtualHost>
These lines define a new virtual host, http://square.localhost/, whose document root
corresponds to the $APP_DIR/public/ directory. Restart the Web server to activate these new
settings. Note that if you’re on a network, it might be necessary to update your network’s local
DNS server to let it know about the new host as well.

vinTage – 11/12/2011 21:21 (Laatst gewijzigd op 11/12/2011 21:32)
Heb je je server wel herstart?

Verder weet ik niet of de door jouw ingevulde gegevens wel juist zijn natuurlijk..

edit: deze tut gebruik ik voor mijn virtual hosts en werkt perfect (maar ik heb geen zend, dus daarvoor weet ik het niet zeker..)

Erwin1976 – 11/12/2011 21:32
qua paden klopt alles wel, alleen de document root kan niet gestaert worden op een of andere manier.Ik heb alleen de naam na de root anders (zendframework). Ik ga nog eens proberen alleen de httpd-vhost.conf aam te passen.

vinTage – 11/12/2011 21:33
Zie mn edit even tut

Erwin1976 – 11/12/2011 22:11 (Laatst gewijzigd op 11/12/2011 22:14)
Goeie tut, maar het werkt jammer genoeg nog steeds niet bij me. Ik gebruik ook Zend server, en niet Wamp misschien zit hier verschil in.

Ik kan nu wel mijn ZF starten met de link http://localhost/zendframework/public/

Maar niet als virtual server met de link http://zendframework.localhost/
niet zo'n groot probleem, ik ga mijn tutorial maar op deze manier verder doen.

Toch bedankt.

Groeten Erwin

vinTage – 11/12/2011 22:17 (Laatst gewijzigd op 11/12/2011 22:22)
Erwin1976 schreef:
Ik kan nu wel mijn ZF starten met de link http://localhost/zendframework/public/

Maar niet als virtual server met de link http://zendframework.localhost/


Dit moet toch lukken als je je hosts file aanpast in stap 2 ?

Citaat:
Open your windows host file, C:WINDOWSsystem32driversetchosts , and add the name you want to use for your virtual host.


edit: crewbox item aangemaakt voor de ontbrekende slashes in de quote

Erwin1976 – 11/12/2011 22:23
Nu werkt het wel...ik had hier overheen gelezen. ;)

Gesponsorde links

Je moet ingelogd zijn om een reactie te kunnen posten.
Actieve forumberichten:

© 2002-2012 Sitemasters.be - Regels - Gehost door: Vircon - Laadtijd: 0.046s