I am trying to change the document root on my Ubtuntu 18.04 OpenLiteSpeed server. I would like to change it to /var/www/html/public so I can install my Laravel project there. It's where I am used to having my document root from Apache. I have found the settings within the admin panel (it is now set to /var/www/html/public); however, it seems from other posts that I have found that the user does not have the correct permissions (I get a 500 error when visiting the site). I am wondering how I go about changing those permissions.
# ps -ef|grep litespeed
Returns
root 24011 1 0 22:06 ? 00:00:00 openlitespeed (lshttpd - main)
root 24012 24011 0 22:06 ? 00:00:00 openlitespeed (lscgid)
nobody 24021 24011 0 22:06 ? 00:00:00 openlitespeed (lshttpd - #01)
nobody 24022 24011 0 22:06 ? 00:00:00 openlitespeed (lshttpd - #02)
root 24095 20775 0 22:15 pts/0 00:00:00 grep --color=auto litespeed
Please try set up suexec user/group as this (the last 2 options) to your external app setting, accordingly to your /var/www/html/public owner/group.
but 500 error not necessarily means permission issue.
You can also try create a simple hello world or phpinfo page to test first.
Related
I am trying to host a shiny app on an AWS EC2 for the first time. I have been following this [tutorial] (https://www.charlesbordet.com/en/guide-shiny-aws/#3-how-to-configure-shiny-server).
I adjusted my sudo nano /etc/shiny-server/shiny-server.conf with sanitize_errors false; so the errors display at http://18.144.34.215:3838/. It seems I do not have the correct permission allocated to that folder from the shiny-server.
This is my first attempt at hosting a shiny app on EC2 and a bit lost from other posts I have found searching. What would be the correct commands to give permission to this folder?
Also, please let me know what info you need from me in order to understand this error better.
Here are my folder permission for 'RIBBiTR_DataRepository'
-rw-rwSr-- 1 ubuntu ubuntu 35149 Feb 1 21:32 LICENSE
-rw-rwSr-- 1 ubuntu ubuntu 10 Feb 1 21:32 README.md
drwxrwsrwx 5 ubuntu ubuntu 4096 Feb 1 21:38 RIBBiTR_DataRepository
-rw-rwSr-- 1 ubuntu ubuntu 205 Feb 1 21:32 db_forms.Rproj
drwxrwsr-x 2 ubuntu ubuntu 4096 Feb 1 21:32 misc
And to add, when I try to view the logs I receive a permission denied
ubuntu#ip-172-30-1-21:/var/log/shiny-server$ sudo tail RIBBiTR_DataRepository-shiny-20230201-215702-44689.log
su: ignoring --preserve-environment, it's mutually exclusive with --login
-bash: line 1: cd: /srv/shiny-server/db_forms/RIBBiTR_DataRepository: Permission denied
The issue was in my shiny-server.conf file. I updated the file with a user group, run_as ubuntu;
How do I configure 2nd site on Bitnami Lightsail Wordpress to host a second web site?
I just started with AWS Lightsail and I have a wordpress site running on it without an issues.. I site does not have alot of users so I would like to add my 2nd workpress site to it.
The first thing I am trying is to point my apache to a 2nd folder using vhost. I want into
/home/bitnami/stack/apache/conf/vhosts
and copied the following two files and edited the pathed on the new sites
-rw-r--r-- 1 root root 1830 Jan 11 17:19 wordpress-https-vhost.conf
-rw-r--r-- 1 root root 1998 Jan 11 17:19 wordpress-vhost.conf
I then restarted apache
sudo /opt/bitnami/ctlscript.sh restart apache
both domain names are still going to the same location.. what am I missing
I ran ufw allow 8000 from the root account and am now trying to python manage.py runserver and it is saying error port already in use.
When I run (env) justin#ubuntu-s-1vcpu:~/project$ ps -ef | grep python
I see the following:
root 832 1 0 Feb11 ? 00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
root 884 1 0 Feb11 ? 00:00:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
justin 4225 1 0 Feb16 ? 00:00:49 /home/justin/project/env/bin/python /home/justin/project/env/bin/gunicorn --bind 0.0.0.0:8000 jobzumo.wsgi
justin 12497 12369 0 03:41 pts/1 00:00:00 grep --color=auto python
justin 15455 4225 0 Feb18 ? 00:00:02 /home/justin/project/env/bin/python /home/justin/project/env/bin/gunicorn --bind 0.0.0.0:8000 jobzumo.wsgi
Do I need to kill any of these processes? I have been hesitant as I don't want to screw anything up. Or could the issue be coming from elsewhere?
Note: I am trying to run the project from a user I created, not root, but that is only because the project is in the justin/ directory. Don't know if this has any effect. Also, I ran this project on this server before with no issue, saw the default django rocket ship. Thanks for any help.
Also If I tagged this question wrong I apologize, feel free to move it.
My AWS server was recently rebooted, and on it I had my SVN repository hosted. The SVN path was like so:
svn://ec2-54-xxx-xx-xxx.us-east-2.compute.amazonaws.com/myproject
Now when I try to visit it with TortiseSVN I get:
Unable to connect to a repository at URL
'svn://ec2-54-xxx-xx-xxx.us-east-2.compute.amazonaws.com/myproject'
No repository found in
'svn://ec2-54-xxx-xx-xxx.us-east-2.compute.amazonaws.com/myproject'
When I get into my server I run the following
cd /home/svn/myproject
sudo /usr/bin/svnserve -d
Sure enough I see it running:
[ec2-user#ip-172-xxx-xx-xxx svn]$ ps -ef | grep svn
root 29145 1 0 21:02 ? 00:00:00 /usr/bin/svnserve -d
ec2-user 29157 29108 0 21:02 pts/4 00:00:00 grep svn
But my attempts to hit it fail, regardless. I have been using the svn:// before, but when I tried https:// it gave me Error running context: No connection could be made because the target machine actively refused it and http:// resulted in Redirect cycle detected for URL
Any suggestions on what I'm missing? I'm almost certain it's something simple and dumb, but I've been working it for over 60 minutes now.
I configured 2 mod_wsgi daemons with 2 different os users and groups. Apache will properly spawn a daemon for each user:
# ps -eF
root 10188 1 0 4586 6204 0 09:21 ? 00:00:00 /usr/sbin/httpd
501 10190 10188 0 50531 13592 0 09:21 ? 00:00:00 /usr/sbin/httpd
500 10191 10188 0 48336 5936 0 09:21 ? 00:00:00 /usr/sbin/httpd
apache 10192 10188 0 4867 7300 0 09:21 ? 00:00:00 /usr/sbin/httpd
...
So far it works fine, each request contains the configured mod_wsgi.process_group.
However, when file system privileges of the document root are restricted to the daemon user (chmod -R 700), apache will yield an access denied message in the vHost's error log:
"(13)Permission denied: access to / denied"
I wonder why I need to have public read access, when the files are supposed to be accessed by the daemon only?
Note: this happens also when selinux is turned off.
Apache needs at least search access (+x) to the directories down to where the WSGI script file is located. This is needed when mapping the URL to the WSGI script file so it can determine if the WSGI script file exists.
Another alternative is to have the WSGI script file in an area outside of the protected directories and then have the WSGI script import a specific Python module from the protected area which contains the actual WSGI application. The WSGI script files could be set up by system admins and not something writable by users.