cpanel

How to restart NodeJS with cPanel

走远了吗. 提交于 2020-01-05 08:03:15
问题 I need to know what to use from root side of cPanel based server to restart NodeJS app, for example, if process terminated now for some reasons NodeJS app will not start until I manually start it, same if server restart I need manually to restart it. Also, this is case for several accounts on server, command should allow more apps to be restarted/started. Any help would be great 回答1: Here is an automated way to do the it: - Find if node server [eq. server.js] is running or not. - If server is

Deploy Angular webApp on cPanel

a 夏天 提交于 2020-01-04 04:27:04
问题 I need to deploy my angular 6 app on cPanel. Can someone guide me the steps? I cant't find configuration folder in cPanel. 回答1: STEPS Create a production build by using following command. ng build --prod You will get few production errors, unless you don't fix them you won't be able to create production build. You will find new folder dist in project folder at root. Open that folder, there is index.html file containing base href (href="/"). Replace "/" with the suitable path where you want to

cpanel change ownership of files

帅比萌擦擦* 提交于 2020-01-03 06:08:08
问题 I'm in a totally new situation. I have the access on root on a reseller account. One of the clients for that reseller has a file, he can't modify. Is a file installed with a plugin in wordpress. That much I understood. He is not the owner of the file. I have to change the owner of that file. I have shell acces and cron acces but I was not able to use it to solve the problem. The solution I come out till now, that doesn't work is adding a new cron job(copy and paste from a forum) #!/bin/bash

How to create an addon domain using xmlapi-php?

老子叫甜甜 提交于 2020-01-03 06:00:06
问题 I am trying to create an addon domain using xmlapi-php. I have a shared hosting account. This sample code is from github <?php include '../xmlapi.php'; $ip = getenv('REMOTE_HOST'); $root_pass = getenv('REMOTE_PASSWORD'); $domain = "somedns.com"; $xmlapi = new xmlapi($ip); $xmlapi->password_auth("root",$root_pass); $xmlapi->set_http_client('curl'); $xmlapi->set_port(2086); $xmlapi->set_debug(1); print $xmlapi->adddns($domain,$ip); ?> I am having trouble getting this code to work to create an

htaccess redirect old links to new domain

北慕城南 提交于 2019-12-31 05:22:31
问题 I changed my site domain, and want to redirect old urls to new domain (note: instead of numbers 93, 54 maybe any digit number exists) the old urls are: http://olddomain.com/ http://olddomain.com/45 http://olddomain.com/p/93 the new urls are: http://newdomain.com/ http://newdomain.com/45 http://newdomain.com/p/93 I tried this at htaccess: RewriteEngine on RewriteCond %{REQUEST_URI} RewriteRule http://newdomain.com/ RewriteCond %{REQUEST_URI} (\d+)/ RewriteRule (\d+)/ http://newdomain.com/$1

Cant access eximstats sqlite3 db after WHM64 upgrade

一曲冷凌霜 提交于 2019-12-31 04:57:05
问题 After WHM 64 upgradation, cant access eximstat db. MySQL code changed to PDO for accessing sqlite3 db as follows: $db = new PDO('sqlite:/var/cpanel/eximstats_db.sqlite3', DB_USER, DB_PASSWORD); The failues, defers tables are all blank. In fact, a new blank file was getting created in the var/cpanel directory, instead of getting connection to eximstats db. Surprisingly, CPanel:'View Sent summary' fetch information all correctly, But I cant access in my script which is residing on the domain.

How to deploy war files into cPanel and remove the project name?

会有一股神秘感。 提交于 2019-12-31 04:11:19
问题 I need to run my Java application on cPanel . I have successfully installed Tomcat, I can run my application by copying war file into my www folder but the problem is that it shows the Project name ( war file name) in the address, I need to know how to remove that, so users can access www.example.com rather than www.example.com/MyProject/index.jsp ? 回答1: According to one cpanel hosting service command prompt access is generally turned off for cpanel for security reasons and you have to ask

Reading image from outside public_html with PHP?

。_饼干妹妹 提交于 2019-12-29 08:09:08
问题 this is really stupid, but I been trying dozens of different things and I can't for the life of me work out what I am doing wrong. I have a cpanel installation, with the usual public_html directory and access to the directory below that (call that directory "USER"). I am testing out some things with images. I have put an image file above the public_html, into the USER directory. I have written a test php script which has just a few lines: if(is_file("../1.jpg")){ echo "<img src=\"../1.jpg\" /

Problems in hosting multiple Django cms projects under the same domain?

别说谁变了你拦得住时间么 提交于 2019-12-25 08:58:37
问题 I am a beginner, I do want to deploy multiple Django cms projects under the same domain. I achieved it by using apache 2.2 and mod_wsgi 4.5.3 the configuration is below. ServerName example.com WSGIDaemonProcess blog python-home=/home/rndbkw/project/virtualenv2.7 python-path=/home/rndbkw/project/djangocms WSGIScriptAlias /blog /home/rndbkw/project/djangocms/rnd/wsgi.py process-group=blog application-group=%{GLOBAL} WSGIDaemonProcess rnd python-home=/home/rndbkw/virtualenv2.7 python-path=/home

Route on Laravel keeps redirecting (301) to root of website

我的未来我决定 提交于 2019-12-25 07:48:15
问题 I have an application using the A2 host provider, and inside the public directory its my laravel folder (www.website.com/app) And in my server preferences I am redirecting the root "/" to "/app" The app was OK, but today started to redirect a Route in specific.. Route::get('/postagens/{Alias}/{dataInicio?}', array( 'as' => 'artista.get.posts.all', 'uses' => 'ArtistaController@getPostsMainFeed' ) ); Inside the generated HTML, it makes: http://www.website.com/app/artista/posts/twitter/ but when