![]() |
point apache to a folder
OK,
So, I don't know how I forgot to do this in OS X, but I guess I need to edit the /etc/httpd/httpd.conf file to point it to a particular folder? I downloaded an open source web based front end for a mysql database driven ticketing system. I just need to point apache to that folder and then run the interactive web based set up. So, how do I point apache to this folder? I already have msyql, php, and apache installed and running. Thanks in advance |
I'm not sure, but I think what you are looking for is the DocumentRoot variable in httpd.conf
|
I am not sure either. I downloaded this FOSS inventory software and I have apache, php, perl, and mysql all installed and running on my mac. The instructions just say untar the folder into the root folder of your web server and then open up a a web browser and type in the url, so like localhost/folder and it will then bring up an interactive web based set up page which you use to finish the installation.
|
Quote:
Is that where you untarred the software? |
You have 3 choices:
1. move the installed web app to /Library/WebServer/Documents and access it from http://localhost/foldername 2. move the installed web app to Home -> Sites and access it from http://localhost/~yourusername/foldername (note the ~ before your user name) 3. put the installed web app anywhere and edit httpd.conf file. Change the DocumentRoot to the full path to the web app, minus the final / You must restart Apache after making this change, or reboot the machine. Option 2 is the easiest and most accessable - doesn't require fiddling with system-level folders and lengthy config files. |
Quote:
|
Quote:
On another machine I just downloaded MySQL since OS X does not by default have it on the client software, but OS X server does. |
Ok, that shouldn't break anything. Which URL form do you want?
12.34.56.78/folder servername.org/folder servername/~tlarkin/folder |
well this is purely for testing, so it doesn't matter though I think there are some folders that need -r-x permissions for everyone in this package.
Once testing is done and if we decide it is good enough to keep, I will probably migrate this to a dedicated machine for the sole purpose of running that ticket system. So, eventually it will have a static IP and I will have our network managers give me a domain name so I can just go www.ticketsystem.org (for example) and add it to our internal domains. For now, I can just toss it in the local admin's home folder for the mac mini that is hosting it to test it out. Thanks for the help, I am used to linux where it is a lot of times in /var/www I suppose it doesn't matter where it lives since you can modify it to live anywhere but I would rather keep it where it is suppose to live for now. I have never actually done any web hosting ever on a Mac, so this is kind of new to me. I have ran Apache on Linux and Windows before though. Thanks for your help, it is appreciated. Unfortunately the people that mainly develop this product are from another non english speaking country so their website can be hard to navigate and their forum only has one section for english speaking users. However, it looks like a very nice product and the price is outstanding, since it is 100% free and open source! |
I unpacked the web app and tossed it in /Library/WebServer/Documents/glpi
then I restarted Apache, and when I access http://localhost/glpi I get nothing...........:confused: |
here is the how to on Debian Linux if anyone can toss me some pointers, they seem to have no OS X documentation and when I posted on their forum they said when I figure it out I can add it to their Wiki, lol
http://glpi-project.org/wiki/doku.php?id=en:glpignu So, any suggestions would be super greatly appreciated Thanks |
Out of curiosity, did you edit /etc/apache2/httpd.conf? That's the main config file for Apache 2, which is the web server in Leopard.
|
Quote:
I am running Tiger as well, 10.4.11. I could put Leopard on the machine, I have plenty of extra licenses for Leopard and Leopard server. |
Oops. I meant to ask also if it was Leopard. Otherwise, what I said isn't true. :)
|
When you say:
Quote:
|
Quote:
|
What do you get without the 'glpi'?
Quote:
"Seeing this instead of the website you expected?" If not, there's some other issue with the httpd.conf, DocumentRoot, or elsewhere. If you do see this, I'd start by making sure the 'glpi' directory is readable. Try this in Terminal: ls -la /Library/Webserver/Documents and let's see the results. |
Go for a file directly:
http://localhost/glpi/index.php I don't recall if the default conf file looks for index.php or not. |
If I just do a http://localhost I get the XAMPP index page by default. Perhaps when I installed XAMPP it modified the httpd.conf file? This is my first time running XAMPP, and was recommended it because of how easy it made everything.
|
Here goes the contents of the webserver folder
Code:
testmini:/Library/WebServer/Documents/glpi admin$ ls -al /Library/WebServer/Documents/Err I mean root:admin |
OK
Well, I got to get a bit more familiar with XAMPP today. It seems that when you install XAMPP it puts this on your Mac: Quote:
It puts MYSQL in /Applications/XAMPP/etc So, I move the glpi folder into that directory and it lives there. Now, when I try to run the interactive set up, I still get no dice, but this time its a different error message. Internal server error or misconfiguration Which before I was getting 404. So, it seems that it sees the document there, but it can't load it.... Still trying to figure it out, and I think I like XAMPP, but I should have read all the documentation first. I guess I should have also known better to read all the documentation first, but hey, I am an IT worker, and I only read manuals if I can't figure it out first few tries hahaha. I will post when I figure out exactly whats up with it. Thanks to everyone who helped |
Oy gevalt. So you installed an alphabet soup of programs and now you've got config errors.
Is it a 500 http error? Most common cause of those is misconfigured perl CGI files/folders. Check the execute bits, shebang line for proper path, and that the directory has exec-cgi enabled. |
ah well here is a screen shot
http://img329.imageshack.us/img329/3697/picture1fe9.jpg All that is needed, or should be needed, is load XAMPP, then toss the folder into the xamp/htdocs and be done with it. From my understanding, XAMPP does not alter any default configurations but it just links apache to its web folder as well as the default in OS X. |
I am wiping the mini clean and loading leopard server on there, which has all of that stuff native. I will report back. A guy on the apache forum was baffled why it wouldn't work either.
I am sure I screwed something up, but no one can figure out what... |
update
well leopard server up and running along with everything I need natively installed.
Added the GLPI folder into /Library/WebServer/Documents and when I access http://localhost/glpi it downloads the config file. Do, I need to change the htaccess file in GLPI? I did a chmod 777 to the glpi directory since it does say in the documentation you need fulll access to some files in there. |
htaccess wont do what you are describing. Is this thing written in perl or php? If perl, do files have the execute bit set? If PHP, did you enable the php module? Don't remember if it's on by default or not.
|
It is PHP based, and I think with the new leopard control panel you can go in and manually turn on whatever services you want in the web service and I am almost certain I have PHP running....
Will double check on Monday. Thanks. |
Ok, so can you load a phpinfo file properly? And what happens when you go for a random file directly rather than a directory? In all the examples above you try to get http://localhost/glpi which I'm guessing is a folder. This needs an Apache redirect to http://localhost/glpi/ to even begin to work properly, and another internal function to get http://localhost/glpi/index.php
|
If I try to load the index safari just downloads the file, every time I access the file it just downloads it in text format.....:confused:
|
so http://localhost/glpi/index.php shows you the source code? That's easy - PHP isn't running. Check the httpd.conf file and restart Apache.
|
Well, I took all the #s out of the httpd.conf file to allow for PHP to load and run and I still have the same errors.
I do see in Leopard some things are changed and a lot of this is configured via server admin. I created a new page in server admin and put the path as /Library/WebServer/Documents/glpi and gave it a name, and allowed it permission to run, and turn all options on for it, and listed either html.index or php.index as the default page. I am not sure exactly where to go from here....Why is this so hard lol? |
| All times are GMT -5. The time now is 09:44 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.