Jump to content
xisto Community
realthor

Installing Apache,mysql,php Under Debian

Recommended Posts

Hi guys, i'm not much of a programmer and try for 3-4 days to install on my KANOTIX Apache, MySql and PHP.

At each of them i have issues and can't go further without some help. So please help me here.

I'll take them in row. First i installed apache with apt-get and got installed the following

 

apache2, apache2-common, apache2-mpm-prefork, apache2-utils, libapache2-mod-php5 and some other apache libraries(libxalan2-java, libxerces2-java, libssl0.9.8, libservlet2.3-java, libjaxp1.2-java)-guess these not being important, perhaps were here in Synaptic before installing apache2.

 

I followed the tutorial here:

 

http://forums.xisto.com/no_longer_exists/

 

and it seems that everything should work, but i have a few problems or misunderstandings: first when i tested apache if properly installed i wrote as root etc/init.d/apache2 start and got the following answer:

 

Starting apache 2.0 web server...apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.

 

I suppose because i don't have a domain name but i don't need one as i only want to test CMS locally. Then when i write in a browser http://forums.xisto.com/no_longer_exists/ i get the right page and if i write LOCALHOST/apache2-default/ i get the same. But i learned that the apache server looks also in users' dirs like /home/user/public_html/ if created. So i created one as root and pointed the browser to my user's index.html at LOCALHOST/home/thor/public_html/ but i get the error:

 

The requested URL /home/thor/public_html/ was not found on this server.

 

Should i load a module from mods-available to mods-enabled? cause i've seen in mod-available 2 modules called userdir.conf and userdir.load. And if so how can i do that?

 

So how can i be 100% sure my apache2 install is right? Because i need to know everything is ok before installing php so potential errors there won't be suspected as apache's erors. The same with mysql.

Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

well since Im not much of a linux user what I do recommend is getting xampp for a linux computer and run that, xamp install everything for you without to much editing and also you can run and stop apache, mysql and php with a click of a button.

or download this with its more easier navigation when setting up or own server.

http://www.mywebserver.org/us/downloads/.

But If the linux pros know how to fix your problem do that first then go to my recommendation if no solution can be found.

Share this post


Link to post
Share on other sites

Look in the Tutorial section for a Tutorial about the installation of XAMPP and Tyssen posted a link to a method to allow you to access folders other than the php root as locally addressed addresses by setting them up as Local to your machine. I haven't followed it up yet, so I forget the details.

Share this post


Link to post
Share on other sites

I've made myself a little time to dirch the net for an answer and learned this was a bug in the apache2 as it fails to load userdir.conf and userdir.load modules from mods-available to modules-enabled, but i didn't tried yet to make some simlinks from mods-enabled to the module in mods-available because i don't know if it's the way to go as i've read on apache bugzilla it's not necessary or similar. I've read things about apache on the forum, in the xamp thread too but didn't seem to find anything helpful there. I really wouldn't like to rely on xamp because i am a little geek and i want to get my hands dirty a little bit with .confs and thus i can learn of how apache works. Thanks and perhaps now, that i've insulated the problem, someone could give a help.

Edited by realthor (see edit history)

Share this post


Link to post
Share on other sites

I seem to have succeded by making those 2 simlinks for userdir.conf and userdir.load from mods-available to mods-enabled. The commented line of #UserDir public_html from apache2.conf seems to be of no use unless one wants apache to look in other default folder but public_html. I've found this interesting because even with the line commented with # apache2 would look into my /home/thor/public_html/ for my index.html -even if i write in the browser localhost/~thor/ . If i uncomment it and change public_html to let's say public_htm apache considers the line.

 

Ok, now one question remains which i'd so much like answered, namely: when i start apache i get this line before it starts:

 

apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

 

What should i do to get rid of it, or it's normal when i set up the server locally? Perhaps i should set somewhere a virtual domain name for apache to use when starts...but then, what if i have a few virtual domains i work at?

Edited by realthor (see edit history)

Share this post


Link to post
Share on other sites

Did you read the posting by Tyssen about setting up virtual domains? At the end of the xampp tutorial?

Share this post


Link to post
Share on other sites

Ok, forum must be slow but not getting any answer i did it myself.

Don't really have enough time for these things but now i set my mind into getting this done.

The solution vas very simple indeed, and i needed only to write in my httpd.conf the following line:

 

ServerName thor:80

 

, thor beeing the name i write in browser and 80 the port apache listens to.

Share this post


Link to post
Share on other sites

The solution vas very simple indeed, and i needed only to write in my httpd.conf the following line:

ServerName thor:80

 

Which is essentially the same as this that I posted in the thread I linked to above:

 

<VirtualHost *:80>  DocumentRoot C:/PathtoYourFolder  ServerName thor</VirtualHost>

Share this post


Link to post
Share on other sites

aha, i get it now...didn't know that but seemed easier to me :( this way.So, if i want to have 2 virtual hosts in a certain folder where i keep my websites i could write smth similar, like:<VirtualHost *:80> DocumentRoot /home/thor/www1/ ServerName thor1</VirtualHost><VirtualHost *:80> DocumentRoot /home/thor/www1/ ServerName thor2</VirtualHost> ?Would this work?[i'm again at work and here no linux around]I remmember i did smth similar though but it gave some errors concerning the '*' character conflicting with smth...i can't remmember right now but i'll try at home and let u know so that maybe u can help. Thanks for the answer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.