LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Configuring apache (https://www.linuxquestions.org/questions/debian-26/configuring-apache-302468/)

NeoAndersn007 03-16-2005 05:10 PM

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.

FF103 03-16-2005 05:57 PM

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.

ralvez 03-16-2005 06:12 PM

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

NeoAndersn007 03-16-2005 07:44 PM

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?

ralvez 03-16-2005 09:37 PM

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

NeoAndersn007 03-26-2005 11:36 PM

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
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-03-27 00:22 EST
All 1221 scanned ports on localhost (127.0.0.1) are: filtered

Nmap finished: 1 IP address (1 host up) scanned in 257.333 seconds

thats when apache is not running. now I tried getting mysql set up and it keeps giving me the error
Code:

root@localhost# mysql_install_db --user=mysql
Could not find help file 'fill_help_tables.sql' in ./support-files or inside /usr.

root@localhost# mysqladmin version
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock'exists!

I've tried installing apache 1 and 2 via apt and by source and ive tried mysql from rpm and deb but nothing has worked. Any ideas?

firefly2442 03-27-2005 03:57 PM

Might also want to try installing webmin. It's a good way to see what servers are installed and configure them. :)

NeoAndersn007 03-27-2005 05:31 PM

Code:

debian:~# apt-get install webmin
Reading Package Lists... Done
Building Dependency Tree... Done
webmin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 183 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up webmin (1.180-1) ...
miniserv.pem: No such file or directory
hostname: Unknown host
dpkg: error processing webmin (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 webmin
E: Sub-process /usr/bin/dpkg returned an error code (1)



All times are GMT -5. The time now is 02:21 AM.