vlead / vlabs-platform

Other
1 stars 3 forks source link

Issues while hosting in server using Apache2 #10

Open sounak98 opened 7 years ago

sounak98 commented 7 years ago

Set proxy

Add these lines of codes in the wsgi file.

os.environ['http_proxy']='http://proxy.iiit.ac.in:8080'
os.environ['https_proxy']='http://proxy.iiit.ac.in:8080'

Give permissions

WARNING Temporary Solution

Give permissions for the root directory.

chmod -R 777 /

Some files, specifically /proc would fail. This should be fine in general.

Set the HOME env variable

The user configured for the Apache2 server www-data with home folder as /var/www. This is the default configuration. But it has no HOME env variable. Add this line of code to set the HOME env variable in wsgi file.

os.environ['HOME']='/var/www'

Changes in literate-tools

Can use sounak98/literate-tools for now.

Change these lines in elisp/publish.el

(setq load-path
      (append
       (list "~/emacs/lisp/org-8.2.10/lisp"
         "~/emacs/lisp/org-8.2.10/contrib/lisp")
       load-path))

to

(setq load-path
      (append
       (list (concat (getenv "HOME") "/emacs/lisp/org-8.2.10/lisp")
         (concat (getenv "HOME") "/emacs/lisp/org-8.2.10/contrib/lisp"))
       load-path))

Please make the changes in literate-tools @travula

travula commented 7 years ago

@sounak98

How about executing commands as root?

ssh -o "StrictHostKeyChecking no" <ip-address> "ls -la"

will list the files on the remote machine with ip equal to <ip-address>

The user root's public key on the remote is copied to the file authorized_keys on the same machine to accomplish this.

This can be applied to all the commands that are executed on the machine hosting resource-generator service.