Could not open configuration file /etc/apache2/apache2.conf: No such file or directory - apache

I have just installed Ubuntu & starting with LAMP.
I installed it & it was working just fine till I installed uTorrent. Then after localhost was not opening & I tried with stopping apache & again restarting with it.
I used - sudo service apache2 restart
Now this error is coming - Could not open configuration file /etc/apache2/apache2.conf: No such file or directory
I checked there, there is no such file with this name.
Installed uTorrent is running on 8080 port...can it be problem ?
I really don't know what to do.

Is there an /etc/apache2/httpd.conf ?
If there is, have a look inside it and see what is being included i.e look for anything along the lines of:
Include /etc/apache2/apache2.conf
Basically there error is being thrown because of an incorrect pathname in a Include directive in a conf file

Related

Tactic Installation on centos 7

I am doing installation of tactic 4.5 on centos 7.
i am following
http://community.southpawtech.com/tactic-sys-admin_sys-admin_install-tactic-centos-6.2.html
but in the end when i am trying to access tactic through web
i am getting this error:
The requested URL /tactic was not found on this server.
you need to configure apache properly to fix this.
Copy tactic configuration file in /etc/httpd/conf.d folder
cp /opt/tactic/tactic_data/config/tactic.conf /etc/httpd/conf.d
open httpd.conf file and add Include conf.d/*.conf in the end
systemctl restart httpd.service

Unable to activate Curl on Easyphp Devserver 16.1.1

I am trying to activate curl on my Easyphp Devserver 16.1.1, but I keep getting the error:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php5619vc11x86x160615094909\ext\php_curl.dll' - Impossibile trovare il modulo specificato [cannot open shared object file: No such file or directory].\r\n in Unknown on line 0
I did the following:
un-commented "extension=php_curl.dll" in both php.ini files
verified that the file php_curl.dll actually exists in extension_dir
copied libeay32.dll, libsasl.dll, ssleay32.dll to c:\Windows\System\, c:\Windows\System32\, c:\Windows\SysWOW64\
Downloaded cacert.pem from http://curl.haxx.se/ca/cacert.pem and added the full path to it on curl.cainfo in php.ini
Downloading various versions of curl from https://curl.haxx.se
Set paths to php directories in My Computer > Properties > Advanced > Environment Variables (eg: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php5619vc11x86x160615094909\)
I rebooted after doing all these steps (specially for the step #6)
There are at least 5 similar questions, I followed every suggestion but nothing worked. Apache continues not to see my dll. Can anybody help on this issue?
Old topic but for people who land here and want skip all of the useless steps of Lucian.
Just use the answer from Anar Haziyev on this link:
Activation Curl on EasyPHP
work on easyphp devserver.
I faced the same issue with EasyPHP and what it fixed is that I had to install PHP as a different instance, not in the EasyPHP build and started the PHP service from the command line.

Vagrant for web server with shared folders: Apache breaks file permissions if it tries to stat a file before it exists

I'm not sure if this is an issue with vagrant, virtualbox or a configuration issue inside the box itsef, however:
Using the following setup: Apache is running in the guest with its server root set to /srv/http, this is a synched folder which points to ./public_html on the host.
While most of the time it works as expected, the following steps causes an issue
1) Navigate to a file that doesn't exist localhost:8080/test2.css -- shows a 404 error as expected but correctly connects to the guest which is serving the error
2) Create test2.css with some content and place it in public_html
3) Reload localhost:8080/test2.css -- Still shows a 404 error even though the file now exists
4) To debug, run vagrant ssh and then ls /srv/http. Which shows:
ls: cannot access test2.css: No such file or directory
So it's seeing the file, sort of but it shows without any permissions:
-????????? ? ? ? ? test2.css
-rw-rw-r-- 1 vagrant 7 Oct 23 11:13 test3.css
If I then re-save the file as test3.css, a file that hasn't yet been accessed it works perfectly. E.g. on the host, save the file I had open as test3.css and then navigate to it, it works as expected!
Any ideas? On why this might be?
In short: If apache has tried to read a file that doesn't exist, creating that file will then cause it to have invalid permissions. If apache has never tried to read the file before, it can be created and work as expected.
Thanks for any help, I'm really confused by this!
This turned out to be a kernel bug on the guest. Upgrading to 4.2.4 using the same Vagrant/Virtualbox/Guest Modules solved the issue.

Apache httpd server on windows won't start

I installed Apache on Windows7 through a bitnami install package for trac. As a final installation step the installer tried to start the Apache httpd service and threw up an error that starting the https service failed.
I found out why when I tried to start httpd from command prompt and got this error:
AH00526: Syntax error on line 564 of F:/Bitnami/trac-1.0.9-0/apache2/conf/httpd.conf:
SetEnv takes 1-2 arguments, an environment variable name and optional value to pass to CGI.
Here is the offending line:
SetEnv PATH "${PATH};F:/Bitnami/trac-1.0.9-0/apache2/bin;"
I changed it to this:
SetEnv PATH "F:/Bitnami/trac-1.0.9-0/apache2/bin;"
and the service started.
My questions are:
1) What is the syntax/language used in the httpd.conf file?
2) How would one have to change that line to make it compile and preserve the original intent of appending F:/Bitnami/trac-1.0.9-0/apache2/bin to the environment variable PATH?
3) Assuming this works on some platforms why would it not work on Windows?
Thanks.
Update
Like the responses say the issue was with PATH. However the fact that there are spaces in the paths doesn't appear to be the issue. Not only that I isolated the path in PATH that was causing the problem. It was this "C:\tools\mkstools", exactly like that. I got rid of the quotes and that enabled httpd to start. So I'm still scratching my head. Why would the quotes cause the problem?
For me, it worked by replacing ${PATH} with %PATH%.

Run Intraweb .so on apache

I made a stand alone app and it works find Intraweb 9.4.2'
Create an apache 2 .so
project info ---
library DartsDLL;
uses
ApacheTwoApp,
IWInitApacheTwo,
DLogin in 'DLogin.pas' {IWForm1: TIWAppForm},
ServerController in 'ServerController.pas' {IWServerController:
TIWServerControllerBase},
UserSessionUnit in 'UserSessionUnit.pas' {IWUserSession: TIWUserSessionBase},
DartDM in 'DartDM.pas' {dm: TDataModule},
plyrshow in 'plyrshow.pas' {plyrs: TIWAppForm},
plyrdetail in 'plyrdetail.pas' {weekdtail: TIWAppForm},
NPlyr in 'NPlyr.pas' {FrmNewPlyr: TIWAppForm},
pidlweeks in 'pidlweeks.pas' {Tseasweeks: TIWAppForm};
{$E so}
{$R *.res}
exports
apache_module name 'webdarts_mod';
begin
IWRun;
end.
conf files have been modified
httpd2.pas has been modified
apache restarts ok.
I get no errors in apache logs.
When I try to run inside delphi I get:
Can not run unless host application is defined.
Question how do you run it?
From the menu open Run Parameters and set the host application to C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe or the path where you installed Apache httpd. Another tip is to add -X to the parameters to force Apache httpd to run from a single process to not confuse the debugger.
Looking at project files the two important items are library DartsDll and apache_module name 'webdarts_mod'.
Presuming project compiles DartsDll.so will be created along with apache_module name.
Notice where apache_module name and library are used in LoadModule directive and where library name is used without ext in SetHandler.
Next you need to modify Apache httpd.conf file by adding four lines as follows;
LoadModule webdarts_mod modules/Dartsdll.so
< Location /??????>
SetHandler DartsDll-handler
< Location>
Replace the question marks with anything you desire (except any name you have already used as a apache alias) I used 'guessd'
You must copy the DartsDll.so file to the apache modules directory.
Restart Apache.
In browser just enter - localhost/guessd
If your apache has been configured correctly your .so(dll) will run.