Jump to content
MakeWebGames

LAMPP Users - Getting your HTDOCS folder setup correctly...


Aurora078
 Share

Recommended Posts

Well, I recently installed Linux ( By recent i mean yesterday ). I knew of LAMPP and wanted to install it. With a few command searches via google, i got the stuff extracted to my /opt folder like so... Then, after i did the small security terminal, i proceeded to edit my index.php. Little did i know, that unless i was logged in as root ( or you can use the terminal, but thats a line or two later ), i couldn't do anything without a small line " gksudo 'nautilus /opt' " which mainly allows you to edit anything in the /opt folder during that session. I searched google some more, and found a list of all the commands, and came accross "chmod". Now, being familar with how chmod works, i figured it would work the same as other languages. I was right. " chmod 777 /opt/lampp/htdocs " did the trick, and now i can write, read, etc. my files without having to do it through the terminal all the time. Note: You do have to be in root mode to chmod in that directory, so i suggest using " sudo -s " or the like to do that. This should help anyone who was sick and tired of not knowing, and help others that dont know much about the terminal.

i've attached a link to the site with tons of commands and things for the terminal that i found with a 5 second google search...

http://ss64.com/bash/

By the way, bash stands for Bourne Again SHell, if you didnt know :/

Link to comment
Share on other sites

While using LAMPP is one option, you could also have installed all packages fresh from the repositories. Server versions will ask for it during install, and many, like ubuntu, offer a simpel command to install it afterwards.

for a ubuntu desktop user, one would type in terminal the following code

 sudo tasksel install lamp-server 

or

 sudo apt-get install lamp-server^ 

Doing this will also launch the automated installations and you should get the latest versions like it would be installed on a server. All you basically need to do is run the usermod for apache (please google for more information, I don't feel like posting a whole tutorial on this)

and you'll have a folder public_html in your home account. Much easier to manage and this would be the exact same thing as shared servers work. This will ask less of you, and should be less complex as well while you don't need to worry about permissions :)

Once your lamp environment is installed, it should only take you a minute or 2 to have a full working environment ;)

Link to comment
Share on other sites

By default, this will al automatically start up with the rest of the OS. All you need to do is set up the whole environment once, and you're good to go forever.

Note: if you want to use /home/user/public_html with php, you'll have to put the php_engine off into comments in mod_userdir

Link to comment
Share on other sites

Might not be the best tutorial, but I don't really know a good one that covers mod_userdir the most, however with the links below, you should have enough. If not, try to google around, compare to what a few sites say.

http://httpd.apache.org/docs/current/howto/public_html.html

if you still can not find it out, and would like to know more (or others) let me know, and i'll see if I can't write up a small tutorial, it's not a real loss anyway, I just need to make a bit of time then.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...