PDA

View Full Version : In need of newbie help


Keeper
26th August 2009, 16:27
I set up an Ubuntu server in VirtualBox following this guide: http://www.howtoforge.com/perfect-server-ubuntu-9.04-ispconfig-3

Everything is okay, except that "quotacheck -avugm" gives error "quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.". I wasn't able to solve it despite the error being discussed in many topics on this same forum. But no matter since I don't really need quota in the production server either.

Actual problem is ISPConfig 3 itself. I created two clients one website each. Now, the first client has same hostname as I set up in /etc/hosts and /etc/hostname. Second client uses different hostname.

Now, when I try to access the first website by hostname, it leads me to the default apache site. And when I try to access the second website by hostname, it gives me custom ISPConfig error message "ERROR 403 - Forbidden!".

What I have missed? What do I need to do to have hostnames directed to correct directories?

Thanks in advance. :)

Edit: I got second hostname working, it was a silly error from my part. However, first hostname still directs to default apache site.
Edit 2: quotacheck error was because I was using ext4 instead of ext3. I switched to ext3 and quota is now usable, although it does suggest using journaled quota instead.

till
27th August 2009, 14:28
Try to select the IP address instead of * for the website.

Keeper
27th August 2009, 19:46
ISPConfig3 doesn't display anything but * in the list, no ip-address in the list.

till
27th August 2009, 20:02
Then add the IP address(es) under system > edit server IP.

Keeper
28th August 2009, 12:01
I added IP-address and set it to both first and second website. There was no change in the first website and second website also then directed to the default apache site.

I changed it back to * and second website started working again.

till
28th August 2009, 12:21
Then you either added the wrong IP address or the DNS A-Records of your domains point to a different IP address.

Keeper
28th August 2009, 16:29
I only have one public IP-address, same as which is used in DNS record.

Let me describe the problem again, by using example1.exampledomain.com and example2.exampledomain.com to which I have DNS-A records set up.
- I set public IP-address and example1 hostname in /etc/hosts, and example1 hostname in /etc/hostname.
- After setting up all necessary services and installing ISPConfig 3, I created two websites. One for example1 and another for example2.
- Example1 hostname still points to default Apache page, but example2 works correctly.
- If I add the public IP in "Edit Server IP" and add it to example1 and example2 websites in ISPConfig, both sites are directed to default Apache page.

In a nutshell, example2 works fine until I specify an IP-address to it and example1 never works.

till
30th August 2009, 12:09
Is this server in your local network behind a router?

Keeper
3rd September 2009, 08:58
Nevermind that problem, on production server all is well. Except subdomains. Production server is hosting two domains, domain1.com and domain2.com each in their own IP-address. Both work without problems. But subdomains I have trouble with.

I have created DNS A-record for subdomain by going to DNS, selected domain1.com, Records, A, set subdomain.domain1.com in hostname and same IP-address as domain1.com.

Then I added a new website under Sites, set domain1.com's IP-address as the subdomain's IP-address, set subdomain.domain1.com as domain name and auto-subdomain I left to none.

24 hours later subdomain is still not working. What I have missed? I have searched this forums a lot but they all say the same, A-record should be all that's needed besides of creating a new website of course.

As for error itself. Firefox gives me "Address Not Found" - "Firefox can't find the server at subdomain.domain1.com". And Chrome gives me "DNS error - cannot find server". So it looks like a DNS problem. Is setting A record in ISPConfig not enough?

till
3rd September 2009, 12:20
1) Are there any pending tasks in the jobqueue?
2) Can you ping the domain name from your workstation and does it return the correct IP address?

Keeper
3rd September 2009, 12:29
Hi.

Both main domains ping just fine, they work fine too. Subdomains do not ping.

Ping request could not find host subdomain.domain1.com. Please check the name and try again.


Job queue is clean.

Should I have created CNAME record instead of A record?

Is it correct that subdomain DNS records are added within main domain DNS record, instead of creating new DNS zone?

Keeper
3rd September 2009, 17:22
Not only subdomains but looks like I also have trouble with sending emails. My forums won't send anything out with PHP mail function. Server setup closely follows Debian Lenny 5.0 perfect server guide.

/var/log/mail.err

Sep 3 09:52:34 server amavis[8777]: (08777-01) (!!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/lib/amavis/tmp/amavis-20090903T095234-08777/parts: lstat() failed. ERROR\n"
Sep 3 09:52:34 server amavis[8777]: (08777-01) (!!)ClamAV-clamd av-scanner FAILED: CODE(0x3278108) unexpected , output="/var/lib/amavis/tmp/amavis-20090903T095234-08777/parts: lstat() failed. ERROR\n" at (eval 100) line 527.
Sep 3 09:52:34 server amavis[8777]: (08777-01) (!!)WARN: all primary virus scanners failed, considering backups
Sep 3 09:52:34 server amavis[8777]: (08777-01) (!!)TROUBLE in check_mail: virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: CODE(0x3278108) unexpected , output="/var/lib/amavis/tmp/amavis-20090903T095234-08777/parts: lstat() failed. ERROR\n" at (eval 100) line 527.
Sep 3 09:52:34 server amavis[8777]: (08777-01-2) (!!)TROUBLE in process_request: Can't create file /var/lib/amavis/tmp/amavis-20090903T095234-08777/email.txt: File exists at /usr/sbin/amavisd-new line 5138, <GEN26> line 29.


/var/log/mail.warn

Sep 3 09:52:34 server amavis[8777]: (08777-01) (!!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/lib/amavis/tmp/amavis-20090903T095234-08777/parts: lstat() failed. ERROR\n"
Sep 3 09:52:34 server amavis[8777]: (08777-01) (!!)ClamAV-clamd av-scanner FAILED: CODE(0x3278108) unexpected , output="/var/lib/amavis/tmp/amavis-20090903T095234-08777/parts: lstat() failed. ERROR\n" at (eval 100) line 527.
Sep 3 09:52:34 server amavis[8777]: (08777-01) (!!)WARN: all primary virus scanners failed, considering backups
Sep 3 09:52:34 server amavis[8777]: (08777-01) (!!)TROUBLE in check_mail: virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: CODE(0x3278108) unexpected , output="/var/lib/amavis/tmp/amavis-20090903T095234-08777/parts: lstat() failed. ERROR\n" at (eval 100) line 527.
Sep 3 09:52:34 server amavis[8777]: (08777-01) (!)PRESERVING EVIDENCE in /var/lib/amavis/tmp/amavis-20090903T095234-08777
Sep 3 09:52:34 server amavis[8777]: (08777-01-2) (!!)TROUBLE in process_request: Can't create file /var/lib/amavis/tmp/amavis-20090903T095234-08777/email.txt: File exists at /usr/sbin/amavisd-new line 5138, <GEN26> line 29.
Sep 3 09:52:34 server amavis[8777]: (08777-01-2) (!)Requesting process rundown after fatal error
Sep 3 09:53:27 server postfix/smtpd[8448]: warning: xxx.xx.xx.xx: hostname xxx.xx.xx.xx.pldt.net verification failed: Name or service not known

IP-address censored, but it's not associated with our server or IP. Rest of the mail logs are empty.

I also created email-domain, set it as mail.domain1.com as found in MX DNS record. Then created email mailbox and set it as noreply@mail.hard-light.net. Now when I set my forums to use SMTP with username noreply@mail.hard-light.net and the password I set, it still doesn't send any emails.

till
3rd September 2009, 17:35
Please post the output of:

df -h

and do you get an error when you restart the clamav daemon.

Keeper
3rd September 2009, 17:43
Filesystem Size Used Avail Use% Mounted on
/dev/sda4 444G 81G 340G 20% /
tmpfs 1000M 0 1000M 0% /lib/init/rw
varrun 1000M 116K 1000M 1% /var/run
varlock 1000M 0 1000M 0% /var/lock
udev 1000M 2.7M 997M 1% /dev
tmpfs 1000M 0 1000M 0% /dev/shm
lrm 1000M 2.6M 997M 1% /lib/modules/2.6.27-14-server/volatile
/dev/sda1 92M 53M 35M 61% /boot
/dev/sda2 3.9G 65M 3.7G 2% /tmp


There are no errors when I restart clamav-daemon.

Keeper
3rd September 2009, 18:35
I got subdomains working. There was an error in my setup of DNS A records. In A record hostname field I had typed "subdomain.domain1.com" while correct entry would be just "subdomain".

Now, if I could get sending of emails to work...

Edit: I don't really need clamav to scan outgoing emails on the server. But if I uninstall clamav, instead of previous errors it gets filled with errors it can't find clamav files. How do I stop postfix from attempting virus scans? And also, should those errors stop emails from being sent?

Edit 2: I got email sending to work after I commented out two lines in nano /etc/postfix/main.cf
#content_filter = amavis:[127.0.0.1]:10024
#receive_override_options = no_address_mappings
and executed
postsuper -r ALL && postfix reload

And finally aptitude remove amavisd-new clamav clamav-daemon clamav-docs spamassassin
No more avahi/clamav using ~150MB RAM.

Edit 3: Edited above to be more precise for anyone who has same problem as me.