Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Apache][XAMPP] Tworzenie subdomeny
wiciu010
post
Post #1





Grupa: Zarejestrowani
Postów: 195
Pomógł: 0
Dołączył: 29.04.2007

Ostrzeżenie: (0%)
-----


Mam zainstalowany na localhost serwer Apache (paczka XAMPP).
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>


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


Jak to poprawić? Dodam tylko, że panel klienta ma być wywoływany
z subdomeny a serwis normalnie http://localhost/projekt
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Saki
post
Post #2





Grupa: Zarejestrowani
Postów: 240
Pomógł: 2
Dołączył: 5.12.2010
Skąd: Fulda

Ostrzeżenie: (0%)
-----


root@aaa:/etc/apache2/sites-enabled# cat vote.itunix.eu
  1. <VirtualHost *:80>
  2. ServerName vote.itunix.eu
  3. ServerAlias www.vote.itunix.eu vote.itunix.eu
  4. # w ServerAlias możesz podać kilka subdomen na której ma działać strona.
  5. ServerAdmin mod@itunix.eu
  6.  
  7. DocumentRoot /var/subdomeny/vote
  8. ScriptAlias /cgi-bin/ /var/subdomeny/vote/cgi-bin/
  9. <Directory "/var/subdomeny/vote/cgi-bin">
  10. AllowOverride All
  11. Options FollowSymLinks SymLinksIfOwnerMatch Indexes MultiViews
  12. Order allow,deny
  13. Allow from all
  14. </Directory>
  15.  
  16. ErrorLog /var/log/apache2/error_vote.log
  17. CustomLog /var/log/apache2/access_vote.log combined
  18. </VirtualHost>

Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 26.09.2025 - 12:23