Virtual Hosts

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

Virtual Hosts

Postby binolino » 09. November 2016 11:10

Hallo allerseits,

leider komme ich trotz Fundstücken im Netz nicht weiter.

Habe meinen Apache so eingerichtet, dass ich mehrere virtuelle Hosts verwenden kann. So habe ich localhost auf meine Arbeitsumgebung umgezogen, die xampp Standardseite ist unter xampp.local erreichbar und eine Wordpress-Seite ist unter wordpress.local erreichbar. Ich möchte im Endstadion mehrere Wordpress Instanzen auf jeweils eigenen Virtuellen Hosts unterbringen - mit einer starte ich erstmal :-). Der Apache funktioniert soweit auch. Ich kann meine Webseiten erreichen. Der Vollständigkeit halber ergänze ich die Konfig unterhalb meines Beitrags.

Für Wordpress muss ich eine Möglichkeit schaffen, den zum jeweilig virtuellen Host zugehörigen Ordner per FTP zu erreichen (in meinem Beispiel: "/Users/meinUser/www/wordpress"). Dafür wollte ich den bei XAMPP inkludierten FTP-Server ProFTPD nutzen. Habe gelesen, dass der Webserver auch virtuelle Hosts kann. Komme aber leider bei der Konfiguration per Try-and-Error nicht weiter.

Standardmäßig kann ich mich mit Server: localhost / User: daemon / Password: xampp einloggen und erhalte die Dateien der xampp Standardseite.
Ohne Änderung der Konfiguration erhalte ich diese Dateien ebenfalls wenn ich mich mit Server: wordpress.local / User: daemon / Password: xampp einlogge.

Ergänze ich die Konfiguration um
Code: Select all
<VirtualHost wordpress.local>
 ServerName    "wordpress.local FTP-Server"
 DefaultRoot   /Users/meinUser/www/wordpress/
</VirtualHost>


Erhalte ich von meinem FTP Programm die Ausgabe:
Befehl: USER daemon
Antwort: 331 Password required for daemon
Befehl: PASS *****
Antwort: 530 Login incorrect.
(Verbindung zu localhost geht weiterhin problemlos)

Was muss ich noch ergänzen?

Danke für eure Hilfe!!



proftpd.conf
Code: Select all
ServerName         "ProFTPD"
ServerType         standalone
DefaultServer         on

# Port 21 is the standard FTP port.
Port            21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask            022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances         30

# Set the user and group that the server normally runs at.
User daemon
Group      admin

# Normally, we want files to be overwriteable.
<Directory /Applications/XAMPP/xamppfiles/htdocs/*>
  AllowOverwrite      on
</Directory>

# only for the web servers content
DefaultRoot /Applications/XAMPP/xamppfiles/htdocs

<Limit SITE_CHMOD>                                                                                                                                                         
  DenyAll                                                                                                                                                                 
</Limit> 

# daemon gets the password "xampp"
UserPassword daemon 2TgxE8g184G9c

# daemon is no normal user so we have to allow users with no real shell
RequireValidShell off

# daemon may be in /etc/ftpusers so we also have to ignore this file
#to login with "OSX Users"
AuthPAM on
AuthPAMConfig ftpd
UseFtpUsers off


<VirtualHost wordpress.local>
 ServerName    "wordpress.local FTP-Server"
 DefaultRoot   /Users/meinUser/www/wordpress/
</VirtualHost>



Auszug aus httpd-vhosts.conf
Code: Select all
# localhost
<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "/Users/meinUser/Ordner/htdocs"   
    <Directory "/Users/meinUser/Ordner/htdocs">
        Options Indexes FollowSymLinks ExecCGI Includes
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

# XAMPP
<VirtualHost *:80>
    ServerName xampp.local
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
    <Directory "/Applications/XAMPP/xamppfiles/htdocs">
        Options Indexes FollowSymLinks ExecCGI Includes
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog "logs/xampp.local-error_log"
</VirtualHost>

# My custom host
<VirtualHost *:80>
    ServerName wordpress.local
    DocumentRoot "/Users/meinUser/www/wordpress"
    <Directory "/Users/meinUser/www/wordpress">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog "logs/wordpress.local-error_log"
</VirtualHost>
binolino
 
Posts: 4
Joined: 17. January 2006 11:02
XAMPP version: 7.0.8
Operating System: OS X El Capitain

Re: Virtual Hosts

Postby Nobbie » 09. November 2016 12:40

Ich würde raten, man muss im Virtuellen Host im FTP Server auch explizit den User daemon angeben, so wie im allgemeinen Teil für den ServerName "ProFTPD" auch geschehen. Das wäre das erste, was ich probieren würde:

Code: Select all
UserPassword daemon 2TgxE8g184G9c
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Virtual Hosts

Postby binolino » 09. November 2016 13:18

Danke zunächst Mal für deine Antwort Nobbie.

Ich hab's ausprobiert und leider erhalte ich weiterhin die selbe Meldung im FTP-Programm. Habe auch
Code: Select all
 User daemon
 Group      admin


bzw.
Code: Select all
  <Limit ALL>
    DenyAll
    AllowUser daemon
  </Limit>

(auch statt DenyAll AllowAll und ohne User)

in die Sektion VirtualHost gepackt leider auch ohne Erfolg :-(
binolino
 
Posts: 4
Joined: 17. January 2006 11:02
XAMPP version: 7.0.8
Operating System: OS X El Capitain

Re: Virtual Hosts

Postby binolino » 17. November 2016 15:23

Habe heute das hier probiert:

Code: Select all
<VirtualHost 0.0.0.0>
    Port 3003
    Umask 022
    ServerName "VirtualHost FTP"
    DefaultRoot /home/www/customer3003
</VirtualHost>

http://www.compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/

Leider auch ohne Erfolg :-(
binolino
 
Posts: 4
Joined: 17. January 2006 11:02
XAMPP version: 7.0.8
Operating System: OS X El Capitain


Return to XAMPP für macOS

Who is online

Users browsing this forum: No registered users and 11 guests