Automatically zpanel showing This domains disk limit has been exceeded! for all the websites hosted in VPS with ZPanel
This domains disk limit has been exceeded!
I don't know why this problem occurs but the solutions what I got
Edited /etc/zpanel/configs/apache/httpd-vhosts.conf
Problem Caused Virtual Host Code
# DOMAIN: domain.in
# THIS DOMAIN HAS BEEN DISABLED FOR QUOTA OVERAGE
<virtualhost *:80>
ServerName domain.in
ServerAlias domain.in www.domain.in
ServerAdmin admin#domain.in
DocumentRoot "/etc/zpanel/panel/etc/static/diskexceeded"
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
</virtualhost>
# END DOMAIN: domain.in
################################################################
Replaced with
################################################################
# DOMAIN: domain.in
<virtualhost *:80>
ServerName domain.in
ServerAlias domain.in www.domain.in
ServerAdmin zadmin#localhost
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/domain_in"
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/domain_in:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
ErrorLog "/var/zpanel/logs/domains/zadmin/cessindia.in-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/cessindia.in-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/cessindia.in-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
Require all granted
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"
<location /cgi-bin>
AddHandler cgi-script .cgi .pl
Options ExecCGI
</location>
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtml
</virtualhost>
# END DOMAIN: domain.in
Better Option:
SSH to the server,
type service httpd restart
That's it and problem solved!
Such kind of Problem is happened under the zpanel control panel
first you have to change value of disk quota under the package manager "i.e 0 for unlimited" save it and then reload your apache, see the result
Related
Server is running on RHEL 7.9, httpd 2.4.6 and I have the following structure in my /var/www/html directory:
/site
index.php
I can reach the root index.php by visiting the IP address. However, when I try to access content inside /site directory, it automatically switches to https, hence the content does not load.
Some snippets from /etc/httpd/conf/httpd.conf:
DocumentRoot "/var/www/html"
<Directory />
AllowOverride None
Require all denied
Options -Indexes +FollowSymLinks
</Directory>
<Directory "/var/www/html">
AllowOverride All
Options -Indexes +FollowSymLinks
Require all granted
</Directory>
<Directory "/var/www/html">
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
AccessFileName .htaccess
<IfModule dir_module>
DirectoryIndex index.php index.htm index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
IncludeOptional conf.d/*.conf
I have a virtual host setup for /etc/httpd/conf.d/site.conf
<VirtualHost <server ip>:80>
ServerAdmin webmaster#sitename.com
DocumentRoot /var/www/html/site/
ServerName www.sitename.com
ServerAlias sitename
<Directory /var/www/html/site>
Require all granted
</Directory>
</VirtualHost>
the config file in the Apache site has these lines:
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html/public/
<Directory /var/www/html/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
now I want to add this rule to the Nginx server. I have a shortener URL website that allows customers to use their own custom domain. How do I allow this in the Nginx config file?
Main Domain: www.example.com
If users want to use their own domain they can add unlimited domains that's what I'm trying to achieve with this code. But basically, it's only for the apache and I have installed the script on Nginx server.
I've moved 2 domains on the VPS and they work fine, just one at a time.
If I disable one, then the other one works - not both.
dom1.com , dom2.com
have the same DNS records, except the A records with their domain-name pointing to the same IP on the VPS, their DNS records are both on CloudFlare, and they're both configured the same way on the VPS (with aaPanel).
The only difference is their site directory.
Do you know what could trigger this issue?
CentOS 8
aaPanel 6.8.21
Apache 2.4 (same issue on Nginx 1.19)
DNS manager: CloudFlare
Many Thanks
dom1.com | config
DocumentRoot "/www/wwwroot/dom1.com"
ServerName 745e5c8e.dom1.com
ServerAlias dom1.com mail.dom1.com
#errorDocument 404 /404.html
ErrorLog "/www/wwwlogs/dom1.com-error_log"
CustomLog "/www/wwwlogs/dom1.com-access_log" combined
#HTTP_TO_HTTPS_START
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}$1 [L,R=301]
</IfModule>
#HTTP_TO_HTTPS_END
#referenced redirect rule, if commented, the configured redirect rule will be invalid
IncludeOptional /www/server/panel/vhost/apache/redirect/dom1.com/*.conf
#DENY FILES
<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
Order allow,deny
Deny from all
</Files>
#PHP
<FilesMatch \.php$>
SetHandler "proxy:unix:/tmp/php-cgi-73.sock|fcgi://localhost"
</FilesMatch>
#PATH
<Directory "/www/wwwroot/dom1.com">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Require all granted
DirectoryIndex index.php index.html index.htm default.php default.html default.htm
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster#example.com
DocumentRoot "/www/wwwroot/dom1.com/"
ServerName SSL.dom1.com
ServerAlias dom1.com mail.dom1.com
#errorDocument 404 /404.html
ErrorLog "/www/wwwlogs/dom1.com-error_log"
CustomLog "/www/wwwlogs/dom1.com-access_log" combined
#SSL
SSLEngine On
SSLCertificateFile /www/server/panel/vhost/cert/dom1.com/fullchain.pem
SSLCertificateKeyFile /www/server/panel/vhost/cert/dom1.com/privkey.pem
SSLCipherSuite EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5
SSLProtocol All -SSLv2 -SSLv3 -TLSv1
SSLHonorCipherOrder On
#PHP
<FilesMatch \.php$>
SetHandler "proxy:unix:/tmp/php-cgi-73.sock|fcgi://localhost"
</FilesMatch>
#DENY FILES
<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
Order allow,deny
Deny from all
</Files>
#PATH
<Directory "/www/wwwroot/dom1.com/">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Require all granted
DirectoryIndex index.php index.html index.htm default.php default.html default.htm
</Directory>
</VirtualHost>
dom2.com | config
ServerAdmin webmaster#example.com
DocumentRoot "/www/wwwroot/dom2.com"
ServerName 218ac146.dom2.com
ServerAlias dom2.com mail.dom2.com
#errorDocument 404 /404.html
ErrorLog "/www/wwwlogs/dom2.com-error_log"
CustomLog "/www/wwwlogs/dom2.com-access_log" combined
#DENY FILES
<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
Order allow,deny
Deny from all
</Files>
#PHP
<FilesMatch \.php$>
SetHandler "proxy:unix:/tmp/php-cgi-73.sock|fcgi://localhost"
</FilesMatch>
#PATH
<Directory "/www/wwwroot/dom2.com">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Require all granted
DirectoryIndex index.php index.html index.htm default.php default.html default.htm
</Directory>
</VirtualHost>
I found the problem.
aaPanel added a wrong sub-domain in their config file.
So fixing that resolved the issue.
I tried all the ways I knew, But...
Let me explain with an example what I want.
I have a blog service, with main domain and many domain pointers and subdomains.
Main domain: blog.com
Subdomains: sub1.blog.com, sub2.blog.com, sub3.blog.com and....
Domain pointers : domain1.com , domain2.com, domain3.com and...
Every domain redirect to a spacial subdomain with Php code
But, what is the problem?
When i add a Subdomain (for exapmle sub2.blog.com) to Sub Domains, in user httpd.conf create VirtualHost settings for All domain pointers (sub2.domain1.com, sub2.domain2.com, sub2.domain3.com and...) ... But i don't want it!!!
And what is the big problem ???
for example if i had 600 domain pointer, with create 500 subdomains, httpd add 3000000 (500x600) VirtualHost settings to user httpd.conf file. and httpd.conf file size will be very large.
What will be the result?
A big time needed to create httpd.conf file
Server load coming to very High
Apache server Crash
And...
I want Subdomain VirtualHost just create for Main Domain (sub2.blog.com) , not for Domain Pointers... I don't need sub2.domain1.com or others...
What can i do for this ? Help me Guys
Can I change rewrite_confs script to do what i want it?
Or any way....???
Here the VirtualHost settings that happened to me:(
<VirtualHost 88.88.88.88:80 >
ServerName www.sub1.domain1.com
ServerAlias www.sub1.domain1.com sub1.domain1.com
ServerAdmin webmaster#blog.com
DocumentRoot /home/blog/domains/blog.com/public_html/sub1
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup blog blog
</IfModule>
CustomLog /var/log/httpd/domains/blog.com.sub1.bytes bytes
CustomLog /var/log/httpd/domains/blog.com.sub1.log combined
ErrorLog /var/log/httpd/domains/blog.com.sub1.error.log
<Directory /home/blog/domains/blog.com/public_html/sub1>
AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
Options -ExecCGI -Includes +IncludesNOEXEC
<FilesMatch "\.(inc|php|phtml|phps|php56)$">
<If "-f %{REQUEST_FILENAME}">
#ProxyErrorOverride on
AddHandler "proxy:unix:/usr/local/php56/sockets/blog.sock|fcgi://localhost" .inc .php .phtml .php56
</If>
</FilesMatch>
</Directory>
</VirtualHost>
<VirtualHost 88.88.88.88:80 >
ServerName www.sub1.domain2.com
ServerAlias www.sub1.domain2.com news.domain2.com
ServerAdmin webmaster#blog.com
DocumentRoot /home/blog/domains/blog.com/public_html/sub1
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup blog blog
</IfModule>
CustomLog /var/log/httpd/domains/blog.com.sub1.bytes bytes
CustomLog /var/log/httpd/domains/blog.com.sub1.log combined
ErrorLog /var/log/httpd/domains/blog.com.sub1.error.log
<Directory /home/blog/domains/blog.com/public_html/sub1>
AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
Options -ExecCGI -Includes +IncludesNOEXEC
<FilesMatch "\.(inc|php|phtml|phps|php56)$">
<If "-f %{REQUEST_FILENAME}">
#ProxyErrorOverride on
AddHandler "proxy:unix:/usr/local/php56/sockets/blog.sock|fcgi://localhost" .inc .php .phtml .php56
</If>
</FilesMatch>
</Directory>
</VirtualHost>
<VirtualHost 88.88.88.88:80 >
ServerName www.sub1.domain3.com
ServerAlias www.sub1.domain3.com sub1.domain3.com
ServerAdmin webmaster#blog.com
DocumentRoot /home/blog/domains/blog.com/public_html/sub1
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup blog blog
</IfModule>
CustomLog /var/log/httpd/domains/blog.com.sub1.bytes bytes
CustomLog /var/log/httpd/domains/blog.com.sub1.log combined
ErrorLog /var/log/httpd/domains/blog.com.sub1.error.log
<Directory /home/blog/domains/blog.com/public_html/sub1>
AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
Options -ExecCGI -Includes +IncludesNOEXEC
<FilesMatch "\.(inc|php|phtml|phps|php56)$">
<If "-f %{REQUEST_FILENAME}">
#ProxyErrorOverride on
AddHandler "proxy:unix:/usr/local/php56/sockets/blog.sock|fcgi://localhost" .inc .php .phtml .php56
</If>
</FilesMatch>
</Directory>
</VirtualHost>
I tried to redirect a page '/page-one' to '/page/one/' just using Redirect directives but it doesn't work. I tried several options but none of them make it works:
Redirect 301 /page-one /page/one/
Redirect permanent /page-one /page/one/
Redirect 301 /page-one https://www.example.com/page/one/
Please find below the whole apache2.conf file I am using in my project:
<VirtualHost xx.xxx.xx.xx:8080>
ServerName example.com
ServerAlias www.example.com
redirect / https://www.example.com/
Redirect 301 /page-one /page/one/
DocumentRoot /home/admin/web/example.com/public_html
<Directory /home/admin/web/example.com/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir /home/admin/web/example.com/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp
<Files *.php>
SetHandler fcgid-script
</Files>
FCGIWrapper /home/admin/web/example.com/cgi-bin/fcgi-starter .php
</Directory>
<Directory /home/admin/web/example.com/stats>
AllowOverride All
</Directory>
<Directory "/home/user1/public_html">
AllowOverride All
</Directory>
IncludeOptional /home/admin/conf/web/apache2.example.com.conf*
</VirtualHost>
Any suggestions are welcome!
Thanks!