cpanel

.htaccess mod_rewrite - how to exclude addon domain from rewrite rule?

时间秒杀一切 提交于 2019-12-25 06:44:53
问题 my main hosting domain require ssl, so the htaccess transform every url request to https. but i have on the same hosting another domain, with cpanel dir structure ("public_htmml/addon-domain.com") The public_html htaccess is the only I can configure. I need to exclude from the rewrite the directory of the add-on domain. so when a user type www.addondoamin.com or without the www, the htaccess will not do anything. o/w, i get many errors and the addon domain mirror to the main domain. notice

How may i prevent search engines from crawling a subdomain on my website?

拥有回忆 提交于 2019-12-25 06:06:26
问题 I have cPanel installed on my website. I went to the Domains section on cPanel I clicked on subdomains. I assigned the subdomain name (e.g : personal.mywebsite.com ) It wanted me to assign document root folder also. I assigned mywebsite.com/personal if i create robots.txt in my website root(e.g : website.com) User-agent: Disallow: /personal/ Can it also block personal.mywebsite.com? what should i do? thanks 回答1: When you want to block URLs on personal.example.com , visit http://personal

solution for scheduled uploads - cron job?

Deadly 提交于 2019-12-25 05:27:10
问题 I'm trying to find the best solution for scheduling uploads to my server to specific directories. initially uploading the content pushing it live at the defined time I've heard cron job recommended, but I've no idea how to use such a thing. I'm trying to upload .html, .php, and .jpg files to multiple different directories all at the same future time. I'm using Linux, cPanel, PHP. Typical LAMP stack + cPanel. Any input is appreciated. 回答1: cron is really easy. To edit the jobs type crontab -e

Do I need to enable Remote Database Access?

淺唱寂寞╮ 提交于 2019-12-25 05:15:28
问题 I'm building an application which automatically updates an online MySQL database with results from a local computer. I plan to run the following command C:>mysqldump -uUSER -pPASSWORD DATABASE > database.sql C:>mysql -hHOST -pPORT -uUSER -pPASSWORD DATABASE < database.sql Would doing this require me to add my IP address to the Remote Database Access Hosts section of my cpanel? 回答1: you need to enable remote access to your mysql database server:enable remote access 来源: https://stackoverflow

Do I need to enable Remote Database Access?

南楼画角 提交于 2019-12-25 05:15:03
问题 I'm building an application which automatically updates an online MySQL database with results from a local computer. I plan to run the following command C:>mysqldump -uUSER -pPASSWORD DATABASE > database.sql C:>mysql -hHOST -pPORT -uUSER -pPASSWORD DATABASE < database.sql Would doing this require me to add my IP address to the Remote Database Access Hosts section of my cpanel? 回答1: you need to enable remote access to your mysql database server:enable remote access 来源: https://stackoverflow

CPanel API - Creating Subdomains

旧城冷巷雨未停 提交于 2019-12-25 00:37:12
问题 I'm writing a script so I can create subdomains on my account. I'm following this example: CPanel API Example My question: How can I create subdomains? The docs on Cpanel's API don't show this very well. 回答1: Make sure you are using version 2 of the API. Below is a direct link to the instructions to create subdomains. https://documentation.cpanel.net/display/SDK/cPanel+API+2+Functions+-+SubDomain%3A%3Aaddsubdomain 来源: https://stackoverflow.com/questions/26181978/cpanel-api-creating-subdomains

htaccess rewrite only main domain to subfolder

匆匆过客 提交于 2019-12-24 11:51:47
问题 I'm using a cPanel account to host multiple sites. To have a clean public_html, I use .htaccess to redirect the main domain into one of the subfolders. So when user types in www.example.com , it will be rewritten into www.example.com/mainsite/ but still showing www.example.com in the URL. But when using the codes below, every domain (including sub domains) will get redirected to that folder: RewriteCond %{REQUEST_URI} !^/example RewriteRule ^(.*)$ /mainsite/$1 [NC,L] How can I target only www

Unable to send email in laravel in server

*爱你&永不变心* 提交于 2019-12-24 10:48:53
问题 I've following configuration in environment file, MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 MAIL_USERNAME=myemail@gmail.com MAIL_PASSWORD='mypassword' MAIL_ENCRYPTION=ssl I've made user registration from RegistrationController and send email to verify that user. It works perfectly in the local LAMP server with ubantu. But, following error is encountered in C Panel. Swift_TransportException Connection could not be established with host smtp.gmail.com [Network is unreachable #101]

error `Missing storage symlink` for voyager admin panel in cPanel

好久不见. 提交于 2019-12-24 02:04:50
问题 I have uploaded a voyager admin panel in my cPanel. It gives error Missing storage symlink and images are not shown of new added item. Suppose I want to add a new user. All information is shown of new user accept user avatar. In locally error is easily fixed by running the cmd php artisan storage:link . But in live server how to fixed this error ? I have already change the path of storage driver in config/filesystems.php . Change the path from storage_path() to public_path() 'public' => [

cPanel cron job, no input file specified?

£可爱£侵袭症+ 提交于 2019-12-23 17:31:44
问题 I've just set up my first cron-jon to run a stock script every night. Running it manually works fine. It's stored in /admin/stock_update.php The command i'm running is /usr/bin/php -q /admin/stock_update.php But I'm getting emails saying no input file is specified? Any ideas? Cheers 回答1: Network services almost never expose actual paths on the server's hard disk drive and even if they could it isn't a behaviour you can rely on. So the fact that your file is located at /admin/stock_update.php