Stworzyłem sobie pliki projektu (na frameworku Kohana 3.2) w
/htdocs/projekt.
W tej chwili projekt jest dostępny pod adresem
http://localhost/projekt/
Chcę, aby panel klienta był dostępny pod adresem
http://panel.localhost/projekt/
Tworzę subdomenę w konfiguracji apache (httpd.conf):
Kod
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/projekt"
ServerName panel.localhost/projekt/
ServerAlias www.panel.localhost/projekt/
http://panel.localhost/projekt/ http://www.panel.localhost/projekt/
ErrorLog "logs/noname-error.log"
##ErrorLog "logs/noname-error.log"
#CustomLog "logs/noname-access.log" common
</VirtualHost>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/projekt"
ServerName panel.localhost/projekt/
ServerAlias www.panel.localhost/projekt/
http://panel.localhost/projekt/ http://www.panel.localhost/projekt/
ErrorLog "logs/noname-error.log"
##ErrorLog "logs/noname-error.log"
#CustomLog "logs/noname-access.log" common
</VirtualHost>
Jednak po zrestartowaniu serwera otrzymję error 500 (Internal
Server Error...)
Próbowałem zamienić VirtualHost na NameVirtualHost jednak wtedy
serwer nie chce się uruchomić, sypiąc błędem:
Kod
Syntax error on line 503 of
/Applications/XAMPP/xamppfiles/etc/httpd.conf:
Invalid command '<NameVirtualHost', perhaps misspelled or defined
by a module not included in the server configuration
/Applications/XAMPP/xamppfiles/etc/httpd.conf:
Invalid command '<NameVirtualHost', perhaps misspelled or defined
by a module not included in the server configuration
Jak to poprawić? Dodam tylko, że panel klienta ma być wywoływany
z subdomeny a serwis normalnie http://localhost/projekt