Results 1 to 10 of 23
Can someone please help me, all my sites from the server are offline, my virtual hosts from Apache are not working.
The sites respond to the ping command, for example ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-18-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 11
Please help, virtual hosts not working.
Can someone please help me, all my sites from the server are offline, my virtual hosts from Apache are not working.
The sites respond to the ping command, for example "ping sitename.com"
but they don't work, don't load in the browser, the only address that works is the main domain for the server. I checked the Dns server and records seem to be fine.
They all worked fine before I restarted the machine server.
I may add I have deleted some files from the TMP folder before I have reboot the server and I worry it's from there ?
Can someone please help me, I don't know what to do anymore.
- 03-18-2011 #2
Are apache and (probably) mysql running?
If yes, are there any errors in their logs?You must always face the curtain with a bow.
- 03-18-2011 #3Just Joined!
- Join Date
- Mar 2011
- Posts
- 11
Please understand I'm a newb at linux but I can get around it.
I checked with netstat -ta to see if apache is running and it's listening
However I can not say the same for mysql, it gives an error when I try to see the status with : # mysqladmin -u root -p status
It states 'access denied for user root@localhost'
When I try to restart mysql server with 'etc/init.d/mysql restart' it states that it
has failed. So no mysql server I guess.
I'm afraid that I have deleted something from TMP folder and it's why it's not working?
- 03-18-2011 #4
If it was truly a tmpfile, then it shouldn´t hurt too much.
Can you recall, what you deleted?
It seems, your mysqld is running, or you woul get a connection refused.
You get a access denied, which comes from a running daemon.
I would look at apache and mysql error log.
Just to be sure, what do these print:
Code:ps auwx| egrep '(apache|http|mysql)' lsof | egrep '(apache|http|mysql)' |grep log df -h netstat -anp ping -c 3 www.google.com
You must always face the curtain with a bow.
- 03-18-2011 #5Just Joined!
- Join Date
- Mar 2011
- Posts
- 11
Yes but when I try to start mysql server or restart is states failed.
When I ping -c 3 with a domain on my server it responds back.
Running 'lsof | egrep '(apache|http|mysql)' |grep log 'Does not get any response.
df- h there seems to be avail disk space for everything, little is used tmp folder included.
Where do I look for Apache and mysql logs ?
Where are they located ?
- 03-18-2011 #6
I was hoping to get the exact logfile location and name from that lsof.
Strange, that it didnt find anything.
But there are other ways:
- Apache error log is configured in the apache config.
- Logs are usually in /var/log/apache or /var/log/httpd
What is the output of:
Code:ps auwx|egrep '(http|apache|mysql)'
You must always face the curtain with a bow.
- 03-18-2011 #7Just Joined!
- Join Date
- Mar 2011
- Posts
- 11
the ps auwx|egrep '(http|apache|mysql) output is:
root 8893 0.0 0.0 4716 680 pts/2 S+ 01:15 0:00 egrep (apache|http|mysql)
Also what worries me is that when executing:
etc/init.d/httpd status
I get:
Looking up localhocalhost..making http connection to localhost.
Alert! unable to connect to localhost.
I think apache is running otherwise it would not run my main page from the server, but it has problems because of mysql ? or has other problems, I'm confused. Maybe I deleted something from the TMP sessions, I was worried
that something was there, a backdoor, exploit so I deleted folders and files with the time stamp 2011
- 03-18-2011 #8
ps and also init script indicate, that there is no apache nor mysql running.
Do these show anything:
AlsoCode:httpd -t /etc/init.d/httpd configtest apachectl configtest
Code:netstat -tunlp
Please paste the output in
CODE tags
This makes it easier to read.
And again, can you recall, what you deleted?
It may be in the history
Code:history|grep rm
You must always face the curtain with a bow.
- 03-18-2011 #9Just Joined!
- Join Date
- Mar 2011
- Posts
- 11
This is strange.
[warn] NameVirtualHost 86.120.148.140:80 has no VirtualHosts
But I can see the virtual hosts in webmin under apache, they are there and in the conf apache file.
'/etc/init.d/httpd configtest' and 'apachectl configtest' gives the same error
no virtual hosts.
Strange enough if apache is not running how is my server domain running on the server ?
This is a command?
history|grep rm
It does not do anything, how do I open this or use?
Also:
root@server [/]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2084 0.0.0.0:* LISTEN 3863/entropychat
tcp 0 0 0.0.0.0:199 0.0.0.0:* LISTEN 4056/snmpd
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 3680/spamd.pid --ma
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 4279/perl
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 3636/exim
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 3152/xinetd
tcp 0 0 86.120.148.140:53 0.0.0.0:* LISTEN 2981/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2981/named
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3631/exim
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2981/named
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 3625/exim
tcp 0 0 86.120.148.140:1978 0.0.0.0:* LISTEN 3137/sshd
tcp 0 0 0.0.0.0:2077 0.0.0.0:* LISTEN 3841/cpdavd - accep
tcp 0 0 0.0.0.0:2078 0.0.0.0:* LISTEN 3841/cpdavd - accep
tcp 0 0 :::993 :::* LISTEN 3173/couriertcpd
tcp 0 0 :::995 :::* LISTEN 3185/couriertcpd
tcp 0 0 :::110 :::* LISTEN 3179/couriertcpd
tcp 0 0 :::143 :::* LISTEN 3166/couriertcpd
tcp 0 0 :::465 :::* LISTEN 3636/exim
tcp 0 0 :::21 :::* LISTEN 3086/proftpd: (acce
tcp 0 0 :::25 :::* LISTEN 3631/exim
tcp 0 0 :::26 :::* LISTEN 3625/exim
udp 0 0 0.0.0.0:32768 0.0.0.0:* 2981/named
udp 0 0 0.0.0.0:10000 0.0.0.0:* 4279/perl
udp 0 0 0.0.0.0:161 0.0.0.0:* 4056/snmpd
udp 0 0 86.120.148.140:53 0.0.0.0:* 2981/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 2981/named
udp 0 0 :::32769 :::* 2981/named
root@server [/]#
- 03-18-2011 #10
Well, nobody but you can tell.
Can you please grep your history file for rm, like asked above?
Also, this apache is not reachable.
So whereever you got your mainpage from, it is most probably not from 86.120.148.140
Which brings me back to error logs.
Did you look in /var/log ?
If they are not there, you need to find out the location in apache and mysql confs.You must always face the curtain with a bow.


Reply With Quote

