Configuring apache
I recently tried to get apache/apache2 and php4 to work so I could work on my own site. Unfortunately I have no clue where to put the files or why they're not showing up. I have installed apache2, mysql, and php4. When i restarted my comp and typed http://localhost/ in firefox it timed out. The same thing happened when I ran it as root and when I tried different browsers. I also got drupal installed. How do I get it to display my website? This is not for public use. Its just so I can work on a site then get a host and upload it there.
|
Have you correctly configured the httpd.conf file for Apache? There is a lot of info on the net at google.com/linux on how to do that.It gave me some problems when I first tried to set it up.Also the files for a web site go in /var/www/html , also are you using a router of some sort on your system that has the port to your server blocked? Just google "configure apache" and you'll find loads of stuff. hope this helps.
|
Hi... I'm not familiar with Debian so I cannot tell you go here and do this and that but ...
Just because you installed Apache it does not mean it is running. You must make sure that it starts when your system starts. You can do the following test: issue the command: /usr/sbin/apachectl start (as root) to start the server. Then go to your browser and type :http://127.0.0.1/ and you should be able to see the apache welcome page. If apachectl is not found in the directory I indicated (that is for Slackware) then issue this command "whereis apachectl" to find where it is. Hope this helps. Rick |
I tried that and it was running under ksysguard but it just times out when i go to http://localhost/ or http://127.0.0.1/ and I don't have a html directory in my /var/www/ folder and I'm using my desktop as a server not an actual server ;-) . I have searched for many hours at google and thats when I came here. I tried everything I could think of (mainly just uninstalling firewalls and messing with configuration files) I havn't had this much trouble with Linux since I attempted to get my Winmodem to work. Any ideas?
|
OK, if it is running then put some simple html document in /var/www/htdocs.
Call the document index.html (apahce server will run it automatically under that name). An option also would be to create a directory in your home directory called public_html and if the appropriate variables were set in /etc/apache/httpd.conf you should be able to put the index.html in there and then go to your browser and type http://localhost/~your_home_directory/ and it will run the html document. Now I realize that this a a "mouth full" of words, so ... let's start by putting the index.html in your htdocs directory and we will see from there. By the way ... as root you can also type the following command in the console: tail -f /var/log/apache/error_log and it will show you the reasons apache is not running as expected. That is very often a good source of info when troubleshooting apache. Rick |
ok I have tryed lots of things and I think its that mysql isn't running right or Im running another server software thats trying to feed the pages instead of apache or I have a firewall blocking my requests. Heres what happens after I do a scan of my computer
Code:
root@localhost# nmap -sT -sR -sV -F -P0 127.0.0.1 Code:
root@localhost# mysql_install_db --user=mysql |
Might also want to try installing webmin. It's a good way to see what servers are installed and configure them. :)
|
Code:
debian:~# apt-get install webmin |
All times are GMT -5. The time now is 02:21 AM. |