How do I edit a plesk subdomain home folder from command line in Linux?
I can create the subdomain and assign the home folder from command no problem but now I need to update the home folder.
Try to use something like:
plesk bin subdomain -u subdomain.domain.com -www-root /var/www/vhosts/subdomain.doman.com/wwwroot
More details you can find with help of:
plesk bin subdomain --help
Related
I am trying to add a user in ubuntu using the following command, but the home directory is not getting created.
sudo useradd -p $(openssl passwd -1 MyPassWord) myUserName
But it doesn't seem to add a home directory by default. What should I add to get a home directory created for the user by default
It is right there in the man page for useradd(8):
-m, --create-home
Create the user's home directory if it does not exist. The files and directories contained
in the skeleton directory (which can be defined with the -k option) will be copied to the
home directory.
By default, if this option is not specified and CREATE_HOME is not enabled, no home
directories are created.
how to create symlink from public/storage to storage/app/public in homestead on window.
and how do i access my files from browser, so if i visit that image url via browser then it will show that particular image.
actually i'm building an api which accessible from any domain , so i have to return the url of that particular image which is uploaded. so it will be shown of front end.
i'm also saving path to database which is - storage/app/public/image.png . what should i do now..
I'm new to file system so may be i need steps by step instruction.
i will be so thankful for the help
I had the same problem creating a symbolic link from the "public" folder to a location on the "storage" directory.
I tried to use "mklink /j" as well to create the symlink. However, when I "vagrant ssh" to the virtualbox, I found that it did not actually create the link correctly. Attempting to "cd" to the created link would cause an error. Also it wasn't shown as a symlink in the usual linux notation.
To allow the symlink to be created in the virtualBox:
Open "Local Group Policy Editor".
Go to: Computer Configuration | Windows Settings | Security Settings | Local -Policies | User Rights Assignment
Find the "Create symbolic links" policy and add your logged in user to it.
Restart your host windows machine. ssh to your virtualbox. You may need to run "vagrant up" as an Administrator by opening your CMD using "Run as administrator" option.
Go to your "public" folder, and create your symbolic link using the linux "ln -s" command. It should work now.
I was using Windows 10, but the above should be the same for Windows 7.
The "Create symbolic links" policy may be located somewhere slightly different for earlier versions of Windows.
Credit should go to this blog: Symlink support in Windows and Virtualbox
I tried this and it works. Running homestead on VirtualBox on Windows 10:
Open cmd as administrator
Click Start->Run
Type 'cmd', and press ctrl-shift-enter
Select 'yes' from the pop-up window
Type the following command:mklink /D c:\<project_directory>\public\storage "/home/vagrant/<project_directory>/storage/app"
Then the storage/app will be accessible from public/storage in Homestead VM. Note that this is assuming C:\ is shared as /home/vagrant in Homestead VM.
On a MacOS you need to go to your Homestead folder and:
run: vagrant ssh
navigate to your project root folder
run: php artisan storage:link
And you are done.
If you do this without ssh to vagrant then it will not work.
I have downloaded lucene solr
and I start it by typing in the bin directory
./solr start and so on.
For now the url to access solr is in the localhost domain: http://localhost:8983/solr/
I'd like to change it to another domain, but I don't know how to do it.
Do you want to make an alias for your localhost?
Then you have to edit your hosts and virtualhost config file. Please be more specific!
I am trying to clone an App Engine project written in python, into Pycharm.
My version of git is 1.9
I have the latest version of PyCharm.
I have run gcloud auth login so that I can authenticate using my google account. When I try to clone the repository at https://source.developers.google.com/p/APP-ENGINE-PROJECT
I get a dialog box similar to the one below, request me to enter a username and password.
I enter my gmail account but I can't login. It tells me it can't connect to the repository.
Please help.
Do the following:
Create a directory where you want your local Git repository to be located and navigate to it.
$mkdir directory
$cd directory
Run the gcloud auth login command. This command gets the credentials required to access your Cloud Repository from the Google Cloud Platform.
$ gcloud auth login
Run the gcloud init command. This command creates the local Git repository and adds your Cloud Repository as the Git origin remote.
$ gcloud init project_id
The gcloud init command creates a directory named project_id/default in the current directory. The default directory contains your local Git repository.
Run PyCharm and do one of the following:
On the Welcome screen, click Open
On the main menu, choose File | Open.
In the Select Path dialog box, select the directory named project_id/default
Pycharm will connect to the repository automatically.
I have tried every possible solution to change the document root on ubuntu to my new site but nothing works. I have changed the setting in available sites default file (both document root and directory root) to my new directory housing the website or creating a new available sites file pointing to my web directory and switching the site through a2ensite and a2dissite commands. But still it goes to the same default page
I already fixed that :
Install webmin
From webmin goto servers->Apache webserver
Edit the default "virtual host" :
handle all connections
add your doc-root
use httpd.conf file ..
Once done do a server restart from webmin or the command line:
sudo /etc/init.d/apache2 restart