Not sure which forum this should go.... please move it to wherever it belongs.
Alright, a few years back I had access to some server space that had allowed me to learn the basics of PHP/MySQL. I decided I want to relearn them, problem is I can't figure out Apache. No guides I read really make much sense. I downloaded Rapache as I had seen it in the Ubuntu repository and with that I was able to reach a point where I get the "It Works!" screen, but now I'm confused again. Can somebody explain to me how now to set up php and MySQL and also how do I get pages running (I had added a file called index.php to the folder created with Rapache, and though I knew it wouldnt work right with no php, ht.tp://localhost/index.php says it doesnt even exist, so I'm confused at how you view)
One of my major problems is the guides for linux software always like to show you how to customise it. Well, I'd rather not customise something I don't even understand. Rather just have a basic default setup that will allow me to practise writing php scripts on my laptop.
Cant figure out Apache
Started by jayrare, Mar 19 2009 11:05 AM
13 replies to this topic
#1
Posted 19 March 2009 - 11:05 AM
|
|
|
#2
Guest_Jordan_*
Posted 19 March 2009 - 11:08 AM
Guest_Jordan_*
I don't use Ubuntu but I think all you need is apt-get:
That gives you php5 and apache2. Then:
I took this from here: http://www.howtoforg...ian_lamp_server
$ apt-get install apache2 php5 libapache2-mod-php5
That gives you php5 and apache2. Then:
$ apt-get install mysql-server mysql-client php5-mysql
I took this from here: http://www.howtoforg...ian_lamp_server
#3
Posted 19 March 2009 - 12:00 PM
Okay, php installed fine (I think) and mysql is currently downloading. If I'm understanding this correctly I'd go to /var/www/page to view a page?
EDIT: Okay, still not getting it. Tried opening /var/www/index.php and it brought up the firefox dialog asking me if I want to save or open the file. Not sure what I'm doing wrong.
EDIT: Okay, still not getting it. Tried opening /var/www/index.php and it brought up the firefox dialog asking me if I want to save or open the file. Not sure what I'm doing wrong.
Edited by jayrare, 19 March 2009 - 12:38 PM.
#4
Guest_Jordan_*
Posted 19 March 2009 - 01:57 PM
Guest_Jordan_*
#5
Posted 25 August 2009 - 05:01 PM
I have apache2, php5, and the mysql setup, running off a dyndns hosting service but I cant seem to find in the apache2.conf file where i set up the host address and information thats needed for the webserver to link up to the service
#6
Posted 25 August 2009 - 11:46 PM
XStatik said:
I have apache2, php5, and the mysql setup, running off a dyndns hosting service but I cant seem to find in the apache2.conf file where i set up the host address and information thats needed for the webserver to link up to the service
/etc/httpd/httpd.conf
#7
Posted 26 August 2009 - 10:06 AM
Well there is nothing in the /etc/httpd/httpd.conf file so if you could give me a start as what to add here that would be awesome. Somewhere i need to declare the domain name/server name, and I was thinking it was in the /etc/apache2/apache2.conf but im not sure.
#8
Posted 26 August 2009 - 12:06 PM
run this command at your linux terminal or your server ssh
find / -name "httpd.conf"
#9
Posted 26 August 2009 - 12:35 PM
In Ubuntu all your apache configuration files are in /etc/apache2/
I think httpd.conf just includes apache2.conf - which then includes all the configuration files in /etc/apache2/mods-enabled/ and /etc/apache2/sites-enabled.
I think httpd.conf just includes apache2.conf - which then includes all the configuration files in /etc/apache2/mods-enabled/ and /etc/apache2/sites-enabled.
#10
Posted 26 August 2009 - 01:19 PM
I know where the config files are located, i just am not sure what to actually put in the files. Last time i did it i remember it was just a few simple lines
#11
Posted 26 August 2009 - 01:45 PM
XStatik said:
I know where the config files are located, i just am not sure what to actually put in the files. Last time i did it i remember it was just a few simple lines
<VirtualHost 1.0.0.0.0.1:80> //IP ServerName domain.com:80 ServerAlias www.domain.com UseCanonicalName Off ServerAdmin "email@mailservice.com" DocumentRoot /var/www/domain.com/httpdocs </VirtualHost>
But, by adding these simple lines to your apache file, your website domain will not works!. you need to build DNS stuff for each one of your domains!
#12
Posted 26 August 2009 - 01:54 PM
Before, i never thought i declared it as a virtual host. I thought i just put in the apache2.conf something like ServerName my.servername.com
Does there have to be a virtual host declared?
Does there have to be a virtual host declared?


Sign In
Create Account

Back to top









