Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Apache hosts i sites-enabled, dziwne zachowanie Opera i Chrome
artur_dziocha
post 7.07.2010, 11:10:12
Post #1





Grupa: Zarejestrowani
Postów: 320
Pomógł: 53
Dołączył: 18.09.2007
Skąd: Radom

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


Witam serdecznie
Mam pewien problem z chrome oraz operą. W iceweasel/firefox wszystko jest OK.
Wstawiam konfigurację serwera itp
/etc/apache2/sites-available/default
Kod
<VirtualHost *:80>    
    ServerName localhost
    ServerAdmin webmaster@localhost

    DocumentRoot /home/artur/www/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /home/artur/www/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

/etc/apache2/sites-available/jobeet
Kod
<VirtualHost 127.0.0.1:80>
  ServerName jobeet
  DocumentRoot "/home/artur/www/www/sfprojects/jobeet/web"
  DirectoryIndex index.php
  <Directory "/home/artur/www/www/sfprojects/jobeet/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf /home/artur/www/www/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  <Directory "/home/artur/www/www/sfprojects/jobeet/lib/vendor/symfony/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

/etc/hosts
Kod
127.0.0.1    localhost
127.0.1.1    debian
127.0.0.1    jobeet

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


Zauważyłem dziwne zachowanie w operze oraz chrome. Po wpisaniu w pasku adresu http://localhost opera oraz chrome pobierają stronę jobeta. Tymczasem powinny listować katalogi, które są w /home/artur/www/www. Przynajmniej w Iceweasel sie tak dzieje. Ma ktoś może jakieś rozwiązanie tego problemu? Cache wyczyszczony, historia też. Dziwne jak dla mnie, ze w Iceweasel wszystko jest OK a w operze i chrome jest nie tak:(
Pozdrawiam
Artur Dziocha

Ten post edytował artur_dziocha 7.07.2010, 11:10:43
Go to the top of the page
+Quote Post
cojack
post 7.07.2010, 12:19:40
Post #2





Grupa: Zarejestrowani
Postów: 898
Pomógł: 80
Dołączył: 31.05.2008

Ostrzeżenie: (20%)
X----


Weź mu spróbuj ustawić tak:

  1. 127.0.0.1 jobeet.test www.jobeet.test


--------------------
cojack blog - mój blog (na jakiś czas off).
"jak czegoś nie wiem, to nie myślę że wiem" - moja domena
Go to the top of the page
+Quote Post
artur_dziocha
post 7.07.2010, 12:52:58
Post #3





Grupa: Zarejestrowani
Postów: 320
Pomógł: 53
Dołączył: 18.09.2007
Skąd: Radom

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


wczesniej miałem w
hosts: 127.0.0.1 jobeet.localhost
a w
/etc/apache2/sites-available/jobeet
ServerName jobeet.localhost
i było to samo

To co mi podałeś zmieniłem w /etc/hosts oraz dodałem do /etc/apache2/sites-available/jobeet jako ServerNamei nic z tego. Może to jakas wina przeglądarek?

Dodam System Debian Squeeze.
Problem ten występuje w Opera oraz Chrome.
W Iceweasel jest OK
Go to the top of the page
+Quote Post
cojack
post 7.07.2010, 15:36:49
Post #4





Grupa: Zarejestrowani
Postów: 898
Pomógł: 80
Dołączył: 31.05.2008

Ostrzeżenie: (20%)
X----


A Ty nie masz czasem w etc/hosts takiego wpisu:

  1. 127.0.1.1 nazwa-komputera


?

Patrz jak ja to mam zrobione:

  1. cojack@cojack-laptop:~$ cat /etc/apache2/sites-available/bdt
  2. <VirtualHost *:80>
  3. ServerAdmin webmaster@localhost
  4.  
  5. ServerName bdt.local
  6. ServerAlias www.bdt.local
  7.  
  8. DocumentRoot "/home/cojack/Dokumenty/Projekty/BDT/web"
  9.  
  10. <Directory "/home/cojack/Dokumenty/Projekty/BPDT/web">
  11. Options Indexes FollowSymLinks MultiViews
  12. AllowOverride All
  13. Order Allow,Deny
  14. Allow from All
  15. </Directory>
  16.  
  17. ErrorLog "/home/cojack/Dokumenty/Projekty/BDT/tmp/logs/error.log"
  18.  
  19. # Possible values include: debug, info, notice, warn, error, crit,
  20. # alert, emerg.
  21. LogLevel warn
  22.  
  23. CustomLog "/home/cojack/Dokumenty/Projekty/BDT/tmp/logs/access.log" combined
  24.  
  25. RewriteLog "/home/cojack/Dokumenty/Projekty/BDT/tmp/logs/rewrite.log"
  26. RewriteLogLevel 3
  27. </VirtualHost>


plik /etc/hosts

  1. cojack@cojack-laptop:~$ cat /etc/hosts
  2. 127.0.0.1 localhost.localdomain cojack-laptop
  3. #127.0.1.1 cojack-laptop
  4.  
  5. #Virtual Hosts
  6. 127.0.0.1 aichra.cms www.aichra.cms
  7. 127.0.0.1 drupal.cms www.drupal.cms
  8. 127.0.0.1 presta.shop www.presta.shop
  9. 127.0.0.1 osc.shop www.osc.shop
  10. 127.0.0.1 ltree.test www.ltree.test
  11. 127.0.0.1 venom.local www.venom.local
  12. 127.0.0.1 zf.tutorial www.zf.tutorial
  13. 127.0.0.1 orm.test www.orm.local
  14. 127.0.0.1 bdt.local www.bdt.local


Działa aż miło.

Ten post edytował cojack 7.07.2010, 15:38:48


--------------------
cojack blog - mój blog (na jakiś czas off).
"jak czegoś nie wiem, to nie myślę że wiem" - moja domena
Go to the top of the page
+Quote Post
artur_dziocha
post 8.07.2010, 07:46:48
Post #5





Grupa: Zarejestrowani
Postów: 320
Pomógł: 53
Dołączył: 18.09.2007
Skąd: Radom

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


Już wiem co było nie tak. Za błąd odpowiadał wpis w /etc/apache2/sites-available/jobeet
Zamiast
Kod
<VirtualHost 127.0.0.1:80>
trzeba było użyć
Kod
<VirtualHost *:80>

smile.gif

Pozdrawiam
Artur Dziocha
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 23.04.2024 - 13:03