Apache startet nach Ruby on Rails Installation nicht

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

Apache startet nach Ruby on Rails Installation nicht

Postby fab_1979 » 12. December 2012 14:24

Hallo zusammen!
Ich bin ein Anfänger, was den Gebrauch von Apache betrifft, wollte mir endlich mal Ruby in Ruby on Rails anschauen und habe mir ein Problem eingehandelt, das ich alleine nicht lösen kann.

Mein Versuch war, Ruby on Rails in XAMPP 1.8 zu installieren und bin nach Anleitung vorgegangen: http://www.andriets.com/development-en/ruby/ruby-xampp-en.html

Bis zu Punkt 8 ging alles gut. Dort sollte ich in die httpd.conf folgenden Text kopieren:

Listen 3000
LoadModule rewrite_module modules/mod_rewrite.so

################
# RUBY
################
ServerName rails
DocumentRoot "D:/Projects/xampp/htdocs/dev-ruby/APPLICATION_NAME/public"

Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny
AddHandler cgi-script .cgi
AddHandler fastcgi-script .fcgi

################
# RUBY
################


Ich nehme mal an, das bedeutet ungerfähr, dass auf Port 3000 von nun an Rails laufen soll. Stimmt das?

Gelesen, getan, ich habe diese Zeilen einfach ans Ende von httpd.conf kopiert und gespeichert. Danach startete der Apache aus dem XAMPP Control-Panel nicht mehr. In der error.log steht Folgendes:

[Wed Dec 12 12:35:45.831445 2012] [core:warn] [pid 2552:tid 252] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Dec 12 12:35:45.864447 2012] [ssl:warn] [pid 2552:tid 252] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 12 12:35:45.916450 2012] [mpm_winnt:notice] [pid 2552:tid 252] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Wed Dec 12 12:35:45.916450 2012] [mpm_winnt:notice] [pid 2552:tid 252] AH00456: Server built: Aug 18 2012 12:41:37
[Wed Dec 12 12:35:45.916450 2012] [core:notice] [pid 2552:tid 252] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Dec 12 12:35:45.918450 2012] [mpm_winnt:notice] [pid 2552:tid 252] AH00418: Parent: Created child process 3420
[Wed Dec 12 12:35:46.345475 2012] [ssl:warn] [pid 3420:tid 264] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 12 12:35:46.381477 2012] [mpm_winnt:notice] [pid 3420:tid 264] AH00354: Child: Starting 150 worker threads.
[Wed Dec 12 13:01:48.070844 2012] [core:warn] [pid 2616:tid 256] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Dec 12 13:01:48.135848 2012] [ssl:warn] [pid 2616:tid 256] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 12 13:01:48.187851 2012] [mpm_winnt:notice] [pid 2616:tid 256] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Wed Dec 12 13:01:48.187851 2012] [mpm_winnt:notice] [pid 2616:tid 256] AH00456: Server built: Aug 18 2012 12:41:37
[Wed Dec 12 13:01:48.187851 2012] [core:notice] [pid 2616:tid 256] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Dec 12 13:01:48.189851 2012] [mpm_winnt:notice] [pid 2616:tid 256] AH00418: Parent: Created child process 2552
[Wed Dec 12 13:01:48.695880 2012] [ssl:warn] [pid 2552:tid 268] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 12 13:01:48.731882 2012] [mpm_winnt:notice] [pid 2552:tid 268] AH00354: Child: Starting 150 worker threads.
[Wed Dec 12 14:13:03.665526 2012] [core:warn] [pid 2756:tid 256] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Dec 12 14:13:03.713529 2012] [ssl:warn] [pid 2756:tid 256] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 12 14:13:03.764532 2012] [mpm_winnt:notice] [pid 2756:tid 256] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Wed Dec 12 14:13:03.764532 2012] [mpm_winnt:notice] [pid 2756:tid 256] AH00456: Server built: Aug 18 2012 12:41:37
[Wed Dec 12 14:13:03.765532 2012] [core:notice] [pid 2756:tid 256] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Wed Dec 12 14:13:03.767532 2012] [mpm_winnt:notice] [pid 2756:tid 256] AH00418: Parent: Created child process 2528
[Wed Dec 12 14:13:04.159554 2012] [ssl:warn] [pid 2528:tid 268] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 12 14:13:04.196556 2012] [mpm_winnt:notice] [pid 2528:tid 268] AH00354: Child: Starting 150 worker threads.


Ich werde daraus nicht schlau. Dieses Logfile betrifft 1 erfolgreichen Versuch, Apache zu starten, mehrere erfolglose, und schließlich am Ende wieder einen erfolgreichen, nachdem ich das Listen 3000 ... wieder aus der httpd.conf gelöscht habe.

Kann jemand einen Fehler entdecken/vermuten? Vielen Dank!!
fab_1979
 
Posts: 9
Joined: 12. December 2012 13:59
Operating System: Windows 7

Re: Apache startet nach Ruby on Rails Installation nicht

Postby Altrea » 12. December 2012 16:16

Hallo fab_1979,

Ohne jetzt die komplette Anleitung mal getestet zu haben, kann ich zumindest sagen, dass diese einen gravierenden Fehler in Punkt 8 enthält.
Dort steht geschrieben:
8. Create virtual host for Apache. Go to D:\Projects\xampp\apache\conf\httpd.conf and add some text:

  • Die Virtual Hosts Definitionen in aktuellen Apache Versionen und so auch bei XAMPP liegen in \xampp\apache\conf\extra\httpd-vhosts.conf
  • Der Beispielblock enthält keine einleitende und endende <VirtualHost>-Direktive
  • Direktiven die dort genannt werden bestehen bereits in der Standardkonfiguration und werden somit doppelt eingebunden oder überschrieben

Ich würde für Ruby on Rails sowieso eine der angebotenen Windows Installer verwenden statt XAMPP, aber du könntest es mal folgendermaßen versuchen:
  • Alle Änderungen, die du an der Konfiguration vorgenommen hast Rückgängig machen
  • öffne deine \xampp\apache\conf\httpd.conf und trage unter der Zeile Listen 80 die Zeile Listen 3000 hinzu
  • Die Zeile LoadModule rewrite_module modules/mod_rewrite.so vergisst du mal ganz schnell, diese existiert in der Standardkonfiguration des XAMPP Apache bereits
  • In der Datei \xampp\apache\conf\extra\httpd-vhosts.conf trägst du folgende zwei virtualhost-Blöcke hinzu (Angenommen D:/Projects/xampp/htdocs ist dein XAMPP htdocs Verzeichnis - ansonsten musst du die Pfade anpassen):
    Code: Select all
    <VirtualHost *:80>
        ServerName localhost
        DocumentRoot "D:/Projects/xampp/htdocs"
        ErrorLog "logs/localhost.error.log"
        CustomLog "logs/localhost.access.log" combined
    </VirtualHost>

    <VirtualHost *:3000>
        ServerName rails
        DocumentRoot "D:/Projects/xampp/htdocs/dev-ruby/APPLICATION_NAME/public"
        AddHandler cgi-script .cgi
        AddHandler fastcgi-script .fcgi
        ErrorLog "logs/rails.error.log"
        CustomLog "logs/rails.access.log" combined
        <Directory "D:/Projects/xampp/htdocs/dev-ruby/APPLICATION_NAME/public">
            Options ExecCGI FollowSymLinks
            AllowOverride all
            Require all granted
        </Directory>
    </VirtualHost>
  • versuche Apache zu starten

Alle Codebeispiele ungetestet und ohne Gewähr

mit freundlichen Grüßen,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Apache startet nach Ruby on Rails Installation nicht

Postby fab_1979 » 14. December 2012 11:48

Hallo, wow, vielen Dank! Es hat 100%ig geklappt, jetzt bin ich so weit, wie ich hätte sein sollen nach der Installation. Der Rest muss in Rails geklärt werden.

Danke noch mal.

PS: Ich bin immer wieder fasziniert, wie viele falsche oder nicht ausreichende Anleitungen und Tipps es im Internet zu finden gibt.
fab_1979
 
Posts: 9
Joined: 12. December 2012 13:59
Operating System: Windows 7


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 36 guests