My repository access died when I used CVS2SVN? - apache

I had a problem running CVS2SVN on my server. I have run it successfully before but I got a sort error in pass 5 so this time I added a sort option that pointed to a sort program on my system. (sort="C:/cygwin/bin/sort.exe"). It worked great and CVS2SVN appeared to complete successfully. So I went to my desktop to check out the files (svn co file:///C:/repo_name) and I got this error:
svn: unable to open an ra_local session to url. svn: Unable to open
repository 'file:///C:/repo_name'
When I tried to access my other repositories I got the same message. I checked the Apache log file and I found these messages:
The Apache2.2 service is restarting. Starting the Apache2.2 service.
The Apache2.2 service is running. Init: Session Cache is not
configured [hint: SSLSessionCache]
[Wed Oct 26 15:37:33 2011] [warn] pid file C:/Program Files
(x86)/Apache Software Foundation/Apache2.2/logs/httpd.pid
overwritten -- Unclean shutdown of previous Apache run?
[Wed Oct 26 15:37:40 2011] [error] Internal error: pcfg_openfile()
called with NULL filename
[Wed Oct 26 15:37:40 2011] [error] [client 147.16.148.223] (9)Bad file
descriptor: Could not open password file: (null)
[Wed Oct 26 15:38:37 2011] [error] [client 147.17.209.173]
(20014)Internal error: Can't open file 'c:\projects\svn\format':
The system cannot find the file specified.
[Wed Oct 26 15:38:37 2011] [error] [client 147.17.209.173] Could not
fetch resource information. [500, #0]
[Wed Oct 26 15:38:37 2011] [error] [client 147.17.209.173] Could not
open the requested SVN filesystem [500, #720002]
I have found that if I log on to the server I can check out the files but I when I try to check them back in I get
Error: Commit failed (details follow): Error: Could not open the
requested SVN filesystem
Prior to this, I had been trying to get SSL certificates working on my server and had been changing options in my Apache httpd file. It is currently set to the bare minimum with only one Virtual host *:80 and the following:
<Location /svn >
DAV svn
SVNListParentPath on
SVNPath "c:\projects\svn"
AuthName "Subversion repository (Basic)"
AuthType Basic
</Location>
<Location /webSVN/>
Options FollowSymLinks
AuthType Basic
AuthName "Subversion Repository (web)"
</Location>
I commented out the Include ssl.conf line that brings in all the SSL settings.
Please help! I need to be able to access my repositories from my desktop!

Related

Apache2: No Effect Of ErrorLogFormat

i changed ErrorLogFormat at /etc/apache2/apache2.conf, but the this doesn't effect the log. I also added my ErrorLogFormat to the config files in the sites-enabled directory, but no effect.
ErrorLogFormat "[%{%Y-%m-%d %H:%M:%S}t] [%l] [client %a] %M"
This is the log:
[Sat Oct 13 13:01:56 2018] [error] [client 123.123.123.123:41204] AH01790: user `asd' in realm `some realm' not found: /
EDIT: It's running on a rasperry pi updated. I tested: stop and start, restart on the apache service and system reboot.
grep -r "ErrorLogFormat" /etc/apache2
revealed only the desired format, that i added at apache.conf and the conf files at sites-enabled.
In Apache 2.4 (https://httpd.apache.org/docs/2.4/mod/core.html#errorlogformat), you can use:
ErrorLogFormat "[%{cu}t] [%l] [client %a] %M"
%{cu}t: The current time in compact ISO 8601 format, including micro-seconds
In the log file it will show:
[2018-10-14 10:31:05.273482] [debug] [client AH00931: initialized single connection worker in child 4296 for (localhost)
The date format is the same as what you want, without having to specify all the rules you have.
If you use %{u}t, the log format becomes:
[Sun Oct 14 10:30:31.944078 2018] [info] [client ::1:47376] AH00128: File does not exist: /home/mbert/tools/apache/htdocs/so/oij
which is what you had previously.

password protect website with .htaccess and .htpasswd - error - "Could not open password file:"

We have Plesk site builder through our webhosting with Charter. Using it to create a simple development website.
I am trying to password protect the site using .htaccess / .htpasswd.
I keep getting this error no matter what I do:
[Wed Apr 06 09:02:57 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /.htpasswd
[Wed Apr 06 09:02:57 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'heather' not configured
[Wed Apr 06 09:03:52 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /etc/httpd/.htpasswd
[Wed Apr 06 09:03:52 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'admin' not configured
[Wed Apr 06 09:03:56 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /etc/httpd/.htpasswd
[Wed Apr 06 09:03:56 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'heather' not configured
[Wed Apr 06 09:05:11 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /etc/httpd/HTTP/.htpasswd
[Wed Apr 06 09:05:11 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'admin' not configured
[Wed Apr 06 09:05:15 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /etc/httpd/HTTP/.htpasswd
[Wed Apr 06 09:05:15 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'heather' not configured
I'm not very familiar with Parallels Plesk - and getting a hold of their support is like pulling teeth.
I've checked and double checked the path to the .htpasswd file; seems right.
I've moved it and the .htaccess file to see if I just
don't have it in the right place
I'm not sure what the problem is. I get the authentication box (I notice it doesn't have my "Please Login" message though...
here is the code for the .htaccess file:
#
# AUTHENTICATION
#
### BASIC PASSWORD PROTECTION
AuthUserFile /etc/httpd/HTTP/.htpasswd
AuthName "Please Login"
AuthType basic
<Limit GET POST>
Require valid-user
</Limit>
ANY Help is greatly appreciated or leads in the right direction. THANKS IN ADVANCE!!
Just generate /etc/httpd/HTTP/.htpasswd file by command:
# htpasswd /etc/httpd/HTTP/.htpasswd UserNameYouWant
it asks you for password and generate password file with user UserNameYouWant
Are you sure the file .htpasswd is there in /etc/httpd/HTTP/ directory. otherwise create 1 with the below command
sudo htpasswd -c /etc/apache2/.htpasswd heather
Here you go for step by step configuration:
If you're using CentOS, then probably SELinux is blocking access to that file if the file is outside the webserver root directory. (that's what happened to me).
Solution
Move the file to your web server root directory then restore the file SELinux context using these commands :
mv /path/to/.httpasswd /var/www/html/
restorecon -v /var/www/html/.htpasswd
It's probably a permissions issue if you think the file is in the right place.
Check the file ownership and permissions with:
ls -la /path/to/file
Make sure the file/group that your apache process runs as is able to read the file.
You can check the owner of the process by running:
ps -ef | grep apache
You should see the owner of the process in the leftmost column.
If file ownership is the issue, then use chown to change ownership:
sudo chown username: /path/to/file
You need to do this as root/sudo as non-root users don't have the right to change the ownership normally.
The : after the username changes the group over to the same as the username
I ran into the same problem. For me, .htpasswd was stored under the /home/username/.htpasswds directory. I solved the error by recursively making sure the directory is executable:
chmod +x -R /home/username/.htpasswds
I had the same problem on a Rackspeed server. It was because the file passwd was missing in /home/company/.htpasswds/project/

Anyone succeeded to Install Laravel on Apache2 with fcgi?

I have successfully installed Laravel on Apache2 with php as a module. The instructions are simple. However, when I try with fcgi it does not work. So it has to do with the server configuration. After I visited http://<mylaraveldomain> (domain not public), I looked at /var/log/apache2/error.log and got this error message
[Thu Mar 26 22:52:34.012794 2015] [fcgid:warn] [pid 30834] (104)Connection reset by peer: [client 65.92.253.153:7785] mod_fcgid: error reading data from FastCGI server
[Thu Mar 26 22:52:34.012862 2015] [core:error] [pid 30834] [client 65.92.253.153:7785] End of script output before headers: php-fcgi-wrapper
[Thu Mar 26 22:52:39.826939 2015] [fcgid:error] [pid 30830] mod_fcgid: process /var/www/default/cgi-bin/php5-default/php-fcgi-wrapper(31115) exit(communication error), get unexpected signal 11
I also looked at all other log files in /var/log recently modified after visiting the URL, but no additional useful info was found. Should I look elsewhere? It is not that fcgi is not working, because if I put a file test.php in laravel public folder I can read it fine at the URL http://<mylaraveldomain>/test.php. Is there some special configuration settings to make laravel works with fcgi ? It is possible that it is specific to my installation of fcgi. So, I would like to know if others have succeeded to install laravel with fcgi on apache2. I am on Ubuntu and I made a recent apt-get upgrade.
I checked syslog and there was additional info. I could see a segment fault. I guessed it could be cache management issue. I commented out the line zend_extension=opcache.so in the file /etc/php5/apache2/conf.d/05-opcache.ini and it worked. Of course, this is only a work around.

Mercurial does not startup upon system launch [FreeBSD 9.0 Apache22]

Struggling to find a root of issue with Apache22 and mercurial. Everything seems to work right — made repository, folder with properly configured hgweb.cgi, set permissions etc.
Here comes the main problem. Everything works only if I (re)start Apache manually, using /usr/local/etc/rc.d/apache22 restart otherwise, using service apache22 restart or while whole system is booting, I'm getting up and running Apache with website accessible. But once trying to access web interface it gives me "Internal Server Error" in browser and next messages in http-error.log
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] env:
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] python
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] :
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] No such file or directory
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] Premature end of script headers: hgweb.cgi
My guess is that it could be an issue with environment variables but what a heck is a difference between service run and direct call of script from /usr/local/rc.d/ ? Am I missing something?
Check PATH, it look likes python is not in your path. Maybe add /usr/local/bin to the path of the www user
Solution is really about making user running httpd (www in my case) to have $PATH adjusted. But it might not be obvious for everyone so here is what I did:
created /usr/local/etc/apache22/envvars.d/path.env with content
#!/bin/bash
export PATH=$PATH:/usr/local/bin:/usr/local/sbin
This require Apache to have env_module loaded but this looks like a standard module to be loaded in default configuration.

Premature End of Script Headers from git-http-backend

I am attempting to install git and Apache on Windows. I have installed MSYSGit 1.7.3 on my Windows 2008 server (x64). I selected that the git commands should work from a Windows command prompt when I installed msysgit.
I have added these lines to my http.conf file:
SetEnv GIT_PROJECT_ROOT C:/Repositories
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ "C:/Progra~2/git/libexec/git-core/git-http-backend.exe/"
<Directory />
Options +ExecCGI
Allow from all
</Directory>
I created a repository (MKE_Playground.git). I added a file test.txt.
When I attempt to access the URL http://localhost/git/MKE_Playground.git I get this error in the Apache log:
[Tue Feb 01 15:56:09 2011] [notice] Child 1164: Child process is running
[Tue Feb 01 15:56:09 2011] [notice] Child 1164: Acquired the start mutex.
[Tue Feb 01 15:56:09 2011] [notice] Child 1164: Starting 64 worker threads.
[Tue Feb 01 15:56:09 2011] [notice] Child 1164: Starting thread to listen on port 80.
127.0.0.1 - - [01/Feb/2011:15:56:14 -0600] "GET /git/MKE_Playground.git HTTP/1.1" 500 539
[Tue Feb 01 15:56:14 2011] [error] [client 127.0.0.1] Premature end of script headers: git-http-backend.exe
I know that this means that the headers from the script were malformed. If I were writing the script I would check there, but I assume that the git backend typically provides correct headers. My take on this is that the git http backend failed for some reason. Where can I go to determine why it failed? Is there a Git log someplace?
Pat O
I dealt with a similar problem earlier.
Running "git-http-backend.exe" in a Cygwin shell revealed that the dll, "libiconv2.dll" could not be found. The file is located in the git/bin directory for my Git install (mostly defaults). I added the bin and libexec directories of the git install to my Path, and was able to clone the git repository locally through Apache.
Note: My Apache error logs looked like this - git-http-backend.exe was failing on the missing dll, but not reporting that in the httpd logs:
[Mon Feb 14 15:26:02 2011] [notice] Child 3308: Starting 64 worker threads.
[Mon Feb 14 15:26:02 2011] [notice] Child 3308: Starting thread to listen on port 80.
[Mon Feb 14 15:26:20 2011] [error] [client 127.0.0.1] Premature end of script headers: git-http-backend.exe
[Mon Feb 14 15:26:20 2011] [error] [client 127.0.0.1] Premature end of script headers: git-http-backend.exe
This worked for my 1.7.6.msysgit.0 setup:
In http://www.jeremyskinner.co.uk/2010/07/31/hosting-a-git-server-under-apache-on-windows/, Jeremy Skinner suggests that it must be possible to run Git\libexec\git-http-backend.exe in a Windows cmd shell. When this fails, copy Git\bin\libiconv-2.dll and Git\bin\libiconv2.dll to Git\libexec\git-core and try again. If you can call git-http-backend.exe and it gives you a "500 Internal Server Error", try your clone or fetch again.
I was fighting the same issue. In my case it was a user permission problem. You can check the "log on" information for the Apache Windows Service and test with your domain user for instance (Control Panel->Administrative Tools->Services->Apache->Log On Tab).
After a reboot, browsing to your http://localhost/git/MKE_Playground.git should then give you a Request not supported error in your error.log. That's fine.
git clone http://localhost/git/MKE_Playground.git should work then.
I have abandonded the idea of running Git on Windows. As such this is no longer an issue for me.
Thanks for your help.