LOVE80724 Posted March 23, 2018 Share Posted March 23, 2018 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? ><? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted March 30, 2018 Share Posted March 30, 2018 Sorry, we cannot comment on inability of your hoster team to modify default Apache configuration. Configuring upload via subdomain requires the exact configuration described in FAQ. If your hoster is not able to configure that, you will not be able to upload files via subdomain. Quote Link to comment Share on other sites More sharing options...
davex Posted March 17, 2020 Share Posted March 17, 2020 hi, does the upload subdomain have to be set to apache? can't it be by ngnix? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted March 18, 2020 Share Posted March 18, 2020 hi, does the upload subdomain have to be set to apache? can't it be by ngnix? You can try configure via nginx if you can replicate the same rewrites into nginx config. However we do not provide support for nginx configuration, as we are not able to access rewrites and modify them if needed (since this will require root access to your server). PS: this will not be needed after 5.2.0 update, as we changed uploader to upload by small chunks. For now it is recommened to disable Cloudflare and wait for 5.2.0 update. Quote Link to comment Share on other sites More sharing options...
davex Posted March 18, 2020 Share Posted March 18, 2020 You can try configure via nginx if you can replicate the same rewrites into nginx config. However we do not provide support for nginx configuration, as we are not able to access rewrites and modify them if needed (since this will require root access to your server). PS: this will not be needed after 5.2.0 update, as we changed uploader to upload by small chunks. For now it is recommened to disable Cloudflare and wait for 5.2.0 update. OK perfect. I already thought such a scripted script and it has no small chunks I had small chunks on my old website and it works very well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.