How configure SVN in Cpanel/WHM? - linux

I want to install SVN server in my Linax VPS with cpanel/WHM running. When checking RPM packages through WHM and SSH I saw that SVN is Installed as RPM package. How can I make it work ? I'm not that experienced with server administration. Can anyone help ?

I struggled with this for some time, and then eventually contacted CPanel directly. This is what I did to get it to work after some guidance from them. PS. Please ensure that SVN is already installed by calling yum install subversion
) Log in to WHM ( I have root access )
) Go to Home -> Service Configuration -> Apache Configuration
) Click on Include Editor
) Jump To : Pre Main Include 5) Under "I wish to edit the Pre Main configuration include file for:", select All Versions
) Depending on your server's individual settings and paths on your server,
add the below (I use CentOS gcc version 4.4.6 20120305 (Red Hat
4.4.6-4) (GCC))
LoadModule dav_module /usr/lib64/httpd/modules/mod_dav.so
LoadModule dav_svn_module /usr/lib64/httpd/modules/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib64/httpd/modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNPath /data/svn/repos
AuthType Basic
AuthName "Subversion repos"
AuthUserFile /data/svn/svn-auth-conf
Require valid-user
</Location>
) Click on Update
) Restart Apache
If Apache restarts, you should be OK. You should then be able to (based on above configuration) to access your SVN through yourdomain.com/svn. Use the htpasswd command to create your svn-auth-conf file
One thing I am struggling with is the following error
[Could not open the requested SVN filesystem] but I have a strong feeling that it has to do with folder permissions relating to apache (httpd) under /data/svn/repos. I am investigating :)
These links also helped me
http://wiki.centos.org/HowTos/Subversion
http://docs.cpanel.net/twiki/bin/view/EasyApache/EasyApacheCustomDirectivesOutsideVirtualHost

Related

After installing Pimcore demo i cannot enter /admin

So i'm trying to install Pimcore to my local environment.
I followed the steps at: https://pimcore.com/docs/pimcore/current/Development_Documentation/Getting_Started/Installation.html
The install wen't fine with just one error about running a sql: * An exception occurred while executing 'DROP FUNCTION IF EXISTS PLUGIN_CMF_COLLECT_ASSET_SEGMENT_ASSIGNMENTS;
I did fix that by logging in to mysql as root and executed the query described from this: https://github.com/pimcore/pimcore/issues/4526
So, all installed i went to my browser and localhost. The Pimcore demo page loads, but with no images. And i'm not able to enter /admin. the page doesn't excist.
I have googled around for hours and read about filepermissions, so i set the pimcore project folder to rw for all users.
When i check the project folder i have no "web" folder or "admin" folder..
So where should i look next?
Should there be an admin folder in my project root?
So the problem seemed to be in httpd.conf
user _www (had to be my personal account)
group _www (had to be staff)
Also i have missed the AllowOverride All setting.
I had the same problem as a result of being sloppy..
Running on FreeBSD 13.1 with Apache 2.4 and PHP 8.1 with Composer 2, I made several attempts to install both the demo and the skeleton with the exact same outcome as this question poses.
The reason it failed was that I ran the installation as root. SU to the web service user - probably www - and try again.
Edit: I'd like to add that the installation instructions for Pimcore skips a crucial step for the installation. To a salty PHP developer, this is probably obvious, but for anyone else - after you run "composer create-project pimcore/demo my-project", enter the "my-project" folder (or whatever you chose to name it) and run "composer install".
One more important thing, that is missing in pimcore installation guide.
It looks like the installation doesn't create the .htaccess file in
your-project/public/.htaccess
I have created .htaccess according to:
https://pimcore.com/docs/pimcore/current/Development_Documentation/Installation_and_Upgrade/System_Setup_and_Hosting/Apache_Configuration.html
Make sure that Allowoverride All is set for your the DocumentRoot, in your VHOSTS settings - it is needed for .htaccess support.
<Directory /var/www/<your-domain>/public>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
*public is public directory in pimcore installation folder.
And now it is working well.

Error 503 with httpd localhost server on Fedora 35

So I switched to Fedora and wanted to install LAMP on it. So I followed this article: https://computingforgeeks.com/how-to-install-lamp-stack-on-fedora/. Everything has been installed successfully. Afterward, I wanted to change the default root directory. In order to achieve it, I edited /etc/httpd/conf/httpd.conf and have set:
DocumentRoot "/home/muq/Localhost"
User muq
Group muq
<Directory "/home/muq/Localhost">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
And now I am getting the error: 503 Service Unavailable.
If I change User and Group to default (apache) the error I get is: 403 Forbidden.
Previously I was doing the same thing with Apache on PopOS and it was working fine.
Thank you all in advance!
Did you follow the step in the article which says to set SELinux to permissive? My guess is that you didn't, and that's what's happening: SELinux is preventing user home directory files from being served out by the web server.
You could just follow the advice in the article and just turn it off. But, I strongly recommend that you don't. The thing it's protecting you from here is a reasonable one — a misconfiguration could otherwise very easily expose personal user files to the internet. And here's the key thing: fixing this is really easy! At least as easy as the instructions for disabling SELinux in the article! You just need to do:
sudo chcon -R -t httpd_sys_content_t /home/muq/Localhost
to label that directory as one from which you want to serve httpd content. And that should do it — and still give you all the other protection of SELinux.
(You could also consider a location like /srv/www or /var/www/html as your web root, keeping your home directory out of the whole thing. These are parts of the filesystem designated for that, and to me as a former sysadmin seems cleaner. But the choice is yours.)

Ubuntu Desktop 20.04 - Apache2 without VirtualHost Configuration presents Website

please help me with the following problem:
I have a fresh installed Ubuntu Desktop 20.4 here and installed Apache2 from the ubuntu-repository.
For a test I disabled the 000-default.conf from the sites-enabled directory with a2dissite and removed the file 000-default.conf from the sites-available directory. "apachectl configtest" shows that the syntax is ok. "apachectl -S" shows, that there is no virtual host configuration. I have restarted the computer, but the Apache webserver still serves the standard Website. There are fresh entries in the "other_vhost_access.log". I wonder what configuration serves this website. I thought, when there is no conf-file enabled in "sites-enabled" apache doesn't serve any website?!
Where did I go wrong? Didn't find anything while searching. It's difficult to find the keywords.
Thanx for any help in advance.
Regards
Endi
Apache is serving as per config settings in the main configuration files apache2.conf or httpd.conf

Trying to install GitLab on Apache on CentOS 7

I'm trying to install GitLab, but I want to install it on an Apache web server on my VPS.
I know that GitLab was built for nginx, but I honestly don't want to use it. I was wondering how I would be able to have a setup so that
mysite.com would retrieve the files (like index.html, folders with more files in them, etc.) in /var/www/html
lab.mysite.com would retrieve GitLab.
I've heard you're supposed to use a virtual host, but remember, I'm still an amateur at best with this kind of stuff, so if anyone here is kind enough to make a short step-by-step guide to do this, I'd appreciate this.
Note: Before I've been using this guide to install GitLab, however this is for Nginx, so I was wondering if I was to use this guide but then add onto it, or if I'm going about this all wrong.
By default GitLab will install nginx but usually won't add nginx to your system's service manager (service or systemctl). This makes it confusing when trying to enable Apache (Apache won't start due to default port 80 in use by nginx).
Assuming you've installed Gitlab according to the default install instructions, the Nginx service will now be managed by the gitlab-ctl service manager (which is installed when installed Gitlab).
To stop Nginx, run the following from a command line as root:
gitlab-ctl stop nginx
Now that port 80 is free, you can start Apache (don't forget to install Apache if it's not already / Instructions are for RHEL systems - modify accordingly for Ubuntu etc). Assumes you are root user:
yum install -y httpd;
systemctl start httpd;
systemctl enable httpd;
Let's edit the Gitlab config file to disable nginx and tell gitlab to use apache:
vi /etc/gitlab/gitlab.rb
Add either your domain or IP to the following:
external_url 'http://git.yourdomain.com/'
Find:
# web_server['external_users'] = []
Change to (don't forget to remove the leading '#'):
web_server['external_users'] = ['apache']
Find:
# nginx['enable'] = true
Change to:
nginx['enable'] = false
And finally we have to run a "recompile" with:
gitlab-ctl reconfigure
gitlab-ctl restart
Now the Apache config. When we installed Gitlab, it added a user group called gitlab-www. We need to allow the apache user access to that group. The following assumes you've installed apache and the user apache (48) exists:
To check which group gitlab installed itself under, you can run:
getent group
Now lets modify apache's user and add it to the gitlab-www group:
usermod apache --append --groups gitlab-www
Now we need an Apache Virtual Host to point to the gitlab install.
Add a virtual host to Apache's conf.d directory (this will create a new file):
vi /etc/httpd/conf.d/gitlab.conf
Add the following (tweak according to your needs):
<VirtualHost *:80>
ServerName git.yourdomain.com
ServerSignature Off
ProxyPreserveHost On
<Location />
Order deny,allow
Allow from all
ProxyPassReverse http://127.0.0.1:8080
ProxyPassReverse http://git.yourdomain.com/
</Location>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
# needed for downloading attachments
DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined env=!dontlog
</VirtualHost>
... And now restart Apache:
systemctl start httpd
You may run into issues with things like selinux - You can set things to permissive for debugging purposes.
setenforce 0
I hope this helps someone!

Invalid command ‘Order’, perhaps misspelled or defined by a module not included in the server configuration failed

When I try to start or restart my apache server, I get bellow message:
Syntax error on line 162 of /etc/apache2/apache2.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
failed!
and I tried find this error on google and fix it:
http://linuxindetails.wordpress.com/2009/12/02/invalid-command-order-perhaps-misspelled-or-defined-by-a-module-not-included-in-the-server-configuration-failed/
I get error:
Module authz_host does not exist!
So, some body help me to fix it?
I just had the same problem while upgrading from openSUSE 13.2 to openSUSE Leap 42.1.
The problem is not a missing module in the apache2-configuration.
The problem is the upgrade from apache 2.2 to apache 2.4.
"Order" and "Allow" have to be rewritten as follows (example):
in 2.2:
Order allow,deny
Allow from all
in 2.4:
Require all granted
You can find more options an examples here:
Upgrading apache2
With Apache 2.4 please uncomment/add the following modules:
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_host_module modules/mod_authz_host.so
On SUSE 12, authz_host was already enabled, so I needed to follow willoller's comment and enable mod_access_compat:
a2enmod mod_access_compat
service apache2 restart
You need to enable the authz_host module. Here is the Apache documentation on that module.
I'm not sure what Linux distribution you are using but here are some examples.
Ubuntu:
sudo a2enmod authz_host
sudo service apache2 restart
RHEL:
vi /etc/httpd/conf/httpd.conf
# Make sure this line is not commented:
...
LoadModule authz_host_module modules/mod_authz_host.so
...
If you are running Apache2.4 on Gentoo then make sure you enable the following USE flags that will build the mod_authz_host into apache binary:
apache2_modules_authz_host : Group authorizations based on host (name or IP address)
apache2_modules_access_compat : Group authorizations based on host (name or IP address). Available as a compatibility module with previous versions.
If you are compiling the Apache2.4 from source code then you can follow the same guidance by using the build-time configuration options (complete list here).

Resources