htodocs on another drive

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

htodocs on another drive

Postby sirfragalot » 08. February 2019 07:20

Just updated my XAMPP from an old version that previously allowed htdocs to be under the Applications/XAMPP/xamppfiles/ folder. I have all my development files and environment there including my SVN working copies and am loath to move them to opt/lampp/htdocs.

As this is a work computer, I do not have access to su or sudo . . .

I can, however, edit the httpd.conf file for XAMPP so would would like to point apache to Applications/XAMPP/xamppfiles/httpd

It's decades since I last messed around with apache and conf files so I'm struggling to figure out how to do what I want to do. I've tried variations of:
DocumentRoot "/opt/lampp/htdocs"
<Directory "/opt/lampp/htdocs">
#DocumentRoot "/Macintosh HD/Applications/XAMPP/xamppfiles/htdocs"
#<Directory "/Macintosh HD/Applications/XAMPP/xamppfiles/htdocs">

to no avail. The log when restarting apache is:
ERROR: Failed to stop "apache": cannot stop service: AH00526: Syntax error on line 231 of /opt/lampp/etc/httpd.conf:
DocumentRoot '/Macintosh HD/Applications/XAMPP/xamppfiles/htdocs' is not a directory, or is not readable

I'm pretty certain it's readable as I can use it on the old XAMPP installation (but perhaps I've forgotten my permissions rules), so I think the error is in the naming of the DocumentRoot and the Directory variables.

Any help?

Regards,

Mark
sirfragalot
 
Posts: 8
Joined: 08. February 2019 07:10
XAMPP version: 7.3.1-0
Operating System: OSX

Re: htodocs on another drive

Postby sirfragalot » 08. February 2019 09:59

DocumentRoot "/opt/lampp/htdocs"
<Directory "/opt/lampp/htdocs">
#DocumentRoot "/Macintosh HD/Applications/XAMPP/xamppfiles/htdocs"
#<Directory "/Macintosh HD/Applications/XAMPP/xamppfiles/htdocs">

should, of course, be:
#DocumentRoot "/opt/lampp/htdocs"
#<Directory "/opt/lampp/htdocs">
DocumentRoot "/Macintosh HD/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Macintosh HD/Applications/XAMPP/xamppfiles/htdocs">
sirfragalot
 
Posts: 8
Joined: 08. February 2019 07:10
XAMPP version: 7.3.1-0
Operating System: OSX

Re: htodocs on another drive

Postby Nobbie » 08. February 2019 11:25

Obviously you installed Xampp-VM which runs in a virtual machine. That virtual machine does not have access to your file system, neither to any drive.

You should install one of the normal Xampp versions (without VM) instead. Anyway, it may be a problem not to have su or sudo, that depends on the configuration of the external drive especially how it is mounted. If you do not have sufficient rights to create files and/or if Apache does not have sufficient rights to read the files (Apache runs with another UserId, usually "daemon"), you cannot put htdocs there. But first of all you have to deinstall Xampp-VM and download and install a normal Xampp.
Nobbie
 
Posts: 10987
Joined: 09. March 2008 13:04

Re: htodocs on another drive

Postby sirfragalot » 08. February 2019 14:41

Thanks for the response Nobble.

It eventually dawned on me that I'd installed the wrong version. I downloaded and installed the normal version over my previous normal XAMPP version. The only problem is, while I can start MySQL and ProFTP, Apache does not start. The server event messages look like it's started:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql started at port 3306
Starting ProFTPD...
Checking syntax of configuration file
/Applications/XAMPP/xamppfiles/proftpd/scripts/ctl.sh : proftpd started

but the server is shown as stopped under 'Manage Servers'.

/Application/XAMPP/logs/error_log is 0 bytes.

I restarted the computer in case there were old httpd dæmons hanging around from the VM installation. Still the same issue.

Any ideas on where to look? Might it have been because I did not remove previous folders under /Applications/XAMPP/? (I wanted at least to keep htdocs/.)

Regards,

Mark
sirfragalot
 
Posts: 8
Joined: 08. February 2019 07:10
XAMPP version: 7.3.1-0
Operating System: OSX

Re: htodocs on another drive

Postby Nobbie » 08. February 2019 16:09

Maybe the red light is a false sign? Did you try to enter http://localhost into your browser? Its weird anyway, as there is no error message and Apache seems to start up well. I have no clue what is wrong, maybe its because of the VM Version which possibly has any leftovers from your installation?! I do not have any MacOS PC here in order to run some tests, i am using Linux.
Nobbie
 
Posts: 10987
Joined: 09. March 2008 13:04

Re: htodocs on another drive

Postby sirfragalot » 08. February 2019 16:24

What solved it was indeed removing the previous XAMPP folder under /Applications/ and then re-installing. Information about upgrading rather than installing would be helpful.

Thanks for your advice anyway.

Mark
sirfragalot
 
Posts: 8
Joined: 08. February 2019 07:10
XAMPP version: 7.3.1-0
Operating System: OSX

Re: htodocs on another drive

Postby Nobbie » 08. February 2019 20:22

sirfragalot wrote:Information about upgrading rather than installing would be helpful.


There is no upgrade. Xampp does not support upgrading.
Nobbie
 
Posts: 10987
Joined: 09. March 2008 13:04

Re: htodocs on another drive

Postby sirfragalot » 08. February 2019 20:38

Perhaps but some users like me will think they are upgrading their existing XAMPP installation to a newer one – I had an old installation and now I've upgraded it to a newer version. In which case, there could be some advice in the FAQ about which files it is safe to keep (what is in htdocs/ for example, databases and so on) or some message during installation that the XAMPP folder either should not exist or should be empty. The installation process paid no attention to the fact that my XAMPP folder was there and populated – no error messages, no warnings – so of course I assume everything was OK.

It's a good and very useful product so I'm simply suggesting some user-interface improvements.

Regards,

Mark
sirfragalot
 
Posts: 8
Joined: 08. February 2019 07:10
XAMPP version: 7.3.1-0
Operating System: OSX


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 6 guests