i'm not sure how to set that so i ask my hosting support team:
ME:
Hi i want to configure file uploads via subdomain when running under CloudFlare
For that i want to add
DocumentRoot /var/www/domain.com/public_html
ServerName upload.domain.com
ServerAlias upload.domain.com
AccessFileName .htaccess_upload
Can you please tell me location of file where i can add the above code, Please.
--------------------------
Support team:
Dear Customer
I believe that you want to create a subdomain upload.domains.com and uploads the contents via FTP. You may please note that it is not possible create a subdomain with the same document root as the main domain. The document root for a subdomain should be like "/home/user/public_html/suddomain". It is possible to create this via account's cPanel, and you can create FTP user as well.
If you are using CloudFlare, please make sure to disable CloudFlare mask for the sudomains A record in the CloudFlare panel. Otherwise, the subdomain will point to the CloudFlare's IP, or you can use the server IP instead of the subdomain name while connective via FTP client.
--------------------------
ME:
Hi, I think you have not understood my issue i wanted to add this code
DocumentRoot /var/www/domain.com/public_html
ServerName upload.domain.com
ServerAlias upload.domain.com
AccessFileName .htaccess_upload
In apache setting file, can you please tell me location of file where i can add this.
--------------------------
Support team:
Dear Customer
Manually editing Apache configuration on a cPanel server is not recommend and can break the web server. You may add the required sub domain from WHM itself.
--------------------------
ME:
Also in second step as mention in this https://www.kernel-scripts.com/en/documentation/faq/#section_faq_infrastructure_q63
want to add this line AccessFileName .htaccess_upload
want to make this file .htaccess_upload and add this settings in this file
php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag display_errors Off
php_value upload_max_filesize 2000M
php_value post_max_size 2000M
RewriteEngine on
RewriteBase /
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} =POST
RewriteRule ^uploader$ /admin/include/uploader_nginx.php [L,QSA]
RewriteCond %{REQUEST_METHOD} =POST
RewriteRule ^upload-video/$ /member_profile_view.php?type=upload_video [L,QSA]
RewriteCond %{REQUEST_METHOD} =POST
RewriteCond %{REQUEST_URI} !^/admin/include/uploader_nginx.php.*
RewriteCond %{REQUEST_URI} !^/member_profile_view.php.*
RewriteRule ^.*$ - [R=404,L]
RewriteCond %{REQUEST_METHOD} =GET
RewriteRule ^.*$ - [R=404,L]
How i can so it?
--------------------------
Support team:
Dear Customer
I've gone through the URL "https://www.kernel-scripts.com/en/documentation/faq/#section_faq_infrastructure_q63" and noticed that the mentioned line is to be added to the apache configuration as per the URL.
We cannot revert the changes within a configuration file like a notepad. We can try to add the custom modification if you still want to proceed, but we cannot predict the extend of any such custom modification in a cPanel environment. Also, cPanel won't officially supports the customized servers. Hence, it is not really recommended.
--------------------------that's all--------------------------
so for now , what should i do or choose? ><?