LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 10-14-2005, 01:08 PM   #1
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Apache,MySQL problems


Hey everyone. I am running freeBSD 5.4. I installed Apache with the ports collection. I have had it up and running for awhile with rarely an issue. Well over the last few days I have been messing with installing php and MySQL from the ports collection php5 and MySQL client and server 4.1. Well after a reboot last night and trying to start MySQL with
#/usr/local/etc/rc.d/mysql-server.sh start
I recieved the following error.
rm: /tmp/mysql.sock: Operation not permitted
I figured no big deal I can narrow that down and fix.
Then I tried to access my webserver to get the BSD book I got a connection refused. Whoa, what the heck? Apache is not even running so I do
OSIRIS# apachectl status
and recieve
Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status
So maybe I just needed to start it, which is odd.So I do
OSIRIS# apachectl start
[Fri Oct 14 01:49:26 2005] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
/usr/local/sbin/apachectl start: httpd could not be started

Guys I am at a loss here, it seems one problem after the other.I fix one thing and something else goes down.I know this is probably frm the MySQL install and trying to configure accounts, I just fixed an hostname issue from this thread
http://www.linuxquestions.org/questi...hreadid=369879
so I doubt its that as a matter of fact I rechecked those files and everything is still there I added before. To make sure it wasnt a firewall issue, I dropped the firewall for a second to test an apachectl start and same deal as above. Could someone please save me before I rip my eyeballs out and go insane?

[edit]
fixed typos
[edit]

Last edited by lord-fu; 10-14-2005 at 01:10 PM.
 
Old 10-14-2005, 10:58 PM   #2
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
for the apache what is the output of
apachectl configtest

for the mysql

su mysql
mysql_install_db
/usr/bin/mysqld_safe &

or

/usr/local/bin/mysqld_safe &

##test mysql

root@noc:~# telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
(
4.0.23a}]7;b\)R,Connection closed by foreign host.

##test apache

root@noc:~# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Connection closed by foreign host.



just try it first

Last edited by routers; 10-14-2005 at 11:09 PM.
 
Old 10-15-2005, 01:35 AM   #3
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
routers, thanks for the help. Here are the outputs:

OSIRIS# apachectl configtest
[Fri Oct 14 14:21:14 2005] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
OSIRIS# su mysql
This account is currently not available. (I thought mysql account was created automatically)

OSIRIS# /usr/local/bin/mysqld_safe &
[1] 62417
OSIRIS# Starting mysqld daemon with databases from /var/db/mysql (awesome!)



OSIRIS# telnet localhost 3306
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.MYLAN.
Escape character is '^]'.
HHost 'localhost.MYLAN' is not allowed to connect to this MySQL serverConnection closed by foreign host.


OSIRIS# telnet localhost 80
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host

Thank you.
 
Old 10-15-2005, 01:47 AM   #4
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
ok then i show u mine , settle apache first

---------------------------------------

#LISTEN <- if u have this on , comment it to off

Port 80

HostnameLookups Off

NameVirtualHost *:80

<VirtualHost *>
ServerName rou.homelinux.net
ServerAdmin noc@rou.homelinux.net
DocumentRoot /export/site/noc/www
TransferLog /export/site/noc/logs/access-log
ScriptAlias /cgi-bin/ /export/site/noc/www/cgi-bin/
</VirtualHost>

------------------------------------------

if the server can up then proceed lynx -head -source http://localhost
and gip output
 
Old 10-15-2005, 02:08 AM   #5
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
routers,
#LISTEN (was already commented out)
Port 80 (yes)
HostnameLookups Off
#NameVirtualHost *:80 (this was commented out, as well as the stuff that follows)
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>


following this link from the config to read more....
URL:http://www.apache.org/docs/vhosts/
Thank you.
 
Old 10-15-2005, 02:20 AM   #6
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
erkk...

u need to do this to suite u

add user to system the docroot/translog must point to userpath
where the path its up to u to design it i gip my sampel

<VirtualHost *>
ServerName rou.homelinux.net
ServerAdmin noc@rou.homelinux.net
DocumentRoot /export/site/noc/www
TransferLog /export/site/noc/logs/access-log
ScriptAlias /cgi-bin/ /export/site/noc/www/cgi-bin/
</VirtualHost>


test mine http://rou.homelinux.net

ps: dont blame what u see , just see how its work

Last edited by routers; 10-15-2005 at 02:36 AM.
 
Old 10-15-2005, 11:57 AM   #7
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
Um why would I need virtual hosts if I have not needed it before, isnt that for running more than one webserver from 1 ipaddress? I only have one webserver and one ipaddress.When my friends and I connect since I dont have a real domain name, only what my little LAN is running, if I do need virtual hosts how would I set it up?
In any case here is the httpd-error.log: (The error log was full of some script kiddie bullsh&* trying to look for passwd files but they failed miserably...at least I hope so...I removed the skiddie stuff and was left with this)
[Thu Oct 13 13:17:19 2005] [error] [client 65.24.48.137] request failed: URI too long
[Thu Oct 13 13:17:49 2005] [error] [client 65.24.48.137] File does not exist: /usr/local/www/start/_vti_bin/_vti_aut/fp30reg.dll
[Thu Oct 13 13:38:56 2005] [notice] caught SIGTERM, shutting down
[Thu Oct 13 13:40:24 2005] [alert] mod_unique_id: unable to gethostbyname("OSIRIS.MYLAN")
[Fri Oct 14 01:49:27 2005] [alert] mod_unique_id: unable to gethostbyname("OSIRIS.MYLAN")
[Fri Oct 14 02:05:36 2005] [alert] mod_unique_id: unable to gethostbyname("OSIRIS.MYLAN")
[Sat Oct 15 00:36:46 2005] [alert] mod_unique_id: unable to gethostbyname("OSIRIS.MYLAN")

any more help....please?
 
Old 10-15-2005, 12:18 PM   #8
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
nvermind
for your info i have one domain but i still use <VirtualHost> that for easy maintenance if next day i need to add my freind site for testing purpose and my domain is handle by dyndns.org . FOC

because in virtualhost i can point the file or whatever inside user path not inside system path
like /usr/local/www/bla.. bla.. or such that , yeah my web run for LAN also sometime i need to transfer file from room to another room i no need to execute samba whch i just open browser
and shoot away http://noc/ its would open the web for me

be patient a lot of thing you can learn from there , u see my path i put the userdir in the /export/site/user i doing this i have own reason, normaly ppl put userpath either in /home/user
or /usr/home/user

how ever make the simple thing success first then can go for advance modification
but looks like u install frontpage which i never touch that,

root@noc:~# locate fp30reg.dll
root@noc:~#

i dont have that dll but looks like ur system read that , btw are u give up
otherwise cat /etc/hosts
let me see because i not understand this part
"gethostbyname("OSIRIS.MYLAN")"
maybe this one u more knowledge about this , let me know we share
 
Old 10-15-2005, 12:49 PM   #9
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
routers,
No I do not have frontpage installed...I prefer coding by hand.Tha was probably from some of the script kiddie crap searching for front page exploits.....
No I will never give up....its too much fun!

$ cat /etc/hosts
::1 localhost.MYLAN localhost
127.0.0.1 localhost.MYLAN localhost OSIRIS

MYLAN is the name of my little network , OSIRIS is the name of the webserver.
thank you.
 
Old 10-15-2005, 01:16 PM   #10
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
ermm now i know why u have this problem
--------
OSIRIS# apachectl configtest
[Fri Oct 14 14:21:14 2005] [alert] httpd: Could not determine the server's
-------
can u repair ur /etc/hosts
-------------------------------------
#mine one
127.0.0.1 localhost
192.168.0.11 noc.homelinux.net noc
----------------------------------------

$ cat /etc/hosts
::1 localhost.MYLAN localhost <- remove this line
127.0.0.1 localhost >-- remove .MYLAN localhost OSIRIS
192.168.X.XXX <- add ur eth0 or rl0 or whatever ur nic gip ip here,

so might become like this
127.0.0.1 localhost
192.168.0.200 OSIRIS.domain.com OSIRIS

save it then try apachectl configtest then start


Last edited by routers; 10-15-2005 at 01:41 PM.
 
Old 10-16-2005, 12:44 AM   #11
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
beautiful routers simply beautiful.......many thanks
you were very helpful.

Last edited by lord-fu; 10-16-2005 at 12:45 AM.
 
Old 10-16-2005, 02:58 AM   #12
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
welcome

thanks me by helping other *nix users , make opensource comunittee bigger and largest in the world , my intention to remove micro$oft from this world (i know imposible ) , ms is now going to move job to china, this mean economy US move to China .

I know my company depending a lot of US economy satuation, imagin if US economy become worst, what happen to me, i migh loose job

my company allowed me to introduce system for other company for my extra pocket money,
charging for linux desktop installation , i charge USD 66.28 for 1 unit customize fully working linux system have a look

http://img332.imageshack.us/img332/6...thmovie5mp.png
http://img417.imageshack.us/img417/6518/nethood6oq.png

or u go to my server under > download > pics . here a lot of snap

FYI in my company HQ (MY) brance (TH) all almost 40 unit pc. FULL Linux

from the top level to the low last worker who use computer are using linux , look like i am forcing them but fact i success to on this matter ( no win in the office )

I devide system this way
server os = slackware and freebsd (no gui )
desktop = developed Fedora

cheers
 
Old 10-16-2005, 03:13 AM   #13
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Original Poster
Rep: Reputation: 30
Yeah I try to help others when I feel I can.
I am currently in school and going to graduate next year, so hopefully I can help with trying to invade office spaces with *nix desktops.
Yes more jobs are going overseas than ever before, If you were here we could grab a drink and talk for hours on that subject alone.
Thanks again routers.
Nice screen shots too!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql-php-apache problems.. khuti2005 Linux - Newbie 4 10-20-2005 03:28 PM
Apache Perl Mysql installation problems ridge321 Linux - Newbie 1 02-15-2005 08:49 AM
Apache/PHP/MySQL Problems! Ryand833 Linux - Software 1 04-13-2004 09:37 PM
apache php-mysql configuration problems ugol Linux - Software 1 11-08-2003 09:13 PM
Mysql/Apache Connection problems... amish_geek Linux - Software 2 02-12-2003 10:48 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration