I'm porting over a Windows httpd.conf file to a linux apache server. I'm pretty much done, but the only error i get is:
* Starting web server apache2 [Tue Feb 07 14:24:34 2012] [warn] The Alias directive in /etc/apache2/httpd.conf at line 449 will probably never match because it overlaps an earlier Alias.
Syntax error on line 461 of /etc/apache2/httpd.conf:
Invalid command 'Script', perhaps misspelled or defined by a module not included in the server configuration
Action 'start' failed.
The Apache error log may have more information.
My httpd.conf file at line 461 is as follows:
ScriptAlias /cgi-bin "/var/www/cgi-bin"
Script PUT /cgi-bin/put.py
Looks like the mod_actions module isn't loaded. This module enables the use of Scripts.
If you activate this module, the error message should disappear.
You can typically activate mod_actions by creating a symlink from the respective mods_available directory like this:
ln -s /etc/apache2/mods-available/actions.load /etc/apache2/mods-enabled/actions.load
The directory structure can be different on your machine, but the principle remains the same: There are available modules and these can be activated by symlinking into the mods_enabled dir.
Related
I have a Laravel project on my CentOS7 server which sits on the folder "/var/www/html/myProject".
I have changed my document root in /etc/httpd/conf/httpd.conf to "/var/www/html/myProject/public" both in "DocumentRoot" and in the directory configure so when i enter the IP in the browser it will automatically show the project.
When i try to do so and access my IP through the browser i am greeted with the messages:
Forbidden
You don't have permission to access /form on this server.
Server unable to read htaccess file, denying access to be safe
After further examination i have found out that in my /var/log/httpd/error_log i get the following error after every access attempt:
[Thu May 10 19:39:33.683522 2018] [core:crit] [pid 1994] (13)Permission denied: [client 79.182.62.1:51091] AH00529: /var/www/html/myProject/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/myProject/' is executable
That was very odd to me since the path is supposed to be /var/www/html/myProject/public, but the "public" is missing.
I have restarted my apache several times, and changed the DocumentRoot path to a fictional path just to check if it updates and it is.
Could it maybe be something in the .htaccess file? although i didn't change the file, i left it as Laravel created it.
Check the permissions on /var/www/html/myProject files & directories. Based on the error you pasted it seems apache is attempting to read in data from your myProject directory as directed by the .htaccess file. This is normal operation.
Figure out what user/group your apache is running is. Then remember that your files have to be readable that user and all parent directories have to be accessible (hint: execute bit) for that user.
Finally check the bootstrap/cache and storage laravel directories (& subdirectories) are writeable by the apache user.
To enable SSL and use mod_pagespeed, you need to tell the mod, how to retrieve the resources. The way I need to work is using
ModPagespeedLoadFromFile "https://www.example.com" "/var/www/example/static/"
When I add this to my .htacces (with the correct url/directory), an internal server error occurs. Sadly no error is logged.
Server version: Apache/2.2.14 (Ubuntu)
Server built: Jul 22 2014 14:35:35
X-Mod-Pagespeed:1.9.32.1-4238
Is there anything that I am missing?
The directive may not be set in the .htaccess file. In the documentation it says so for other directives, but not the ModPagespeedLoadFromFile. It still applies here, you need to place it in your vhost configuration.
I have set up ubuntu server on an old pc with webmin as well. I am not sure what was going on but i restarted the server and when it boots it now get this when Apache tries to start.
* Starting web server apache2
apache2: Syntax error on line 237 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/000-default: No such file or directory
Action 'start' failed.
The Apache error log may have more information.
I have checked this file on this line and it looks like this:
# Include the virtual host configurations:
Include sites-enabled/
I have removed Apache and re installed it but not sure why it still fails.
As also answered by Qben, the issue was an invalid symlink in the sites-enabled folder. Removing the broken symlink and adding a valid one will fix the issue.
You do not have a default site enabled:
/etc/apache2/sites-enabled/000-default: No such file or directory
site-enabled should contain symlinks to files in site-available and I guess your 000-default symlink does not link to a real file in site-available.
I guess this Ubuntu guide might be of interest for you.
One of the reason may be that you might have some site that is not enabled.To check that
Go to /etc/apache2/sites-enabled
Out of many/some [sitename].conf files , one/some may be crossed
Delete those found crossed
Restart apache server
sudo service apache2 restart.
Hope this has helped you , but may be some other reason too. Thank you.
I'm trying to connect to SQL Anywhere database on external server. I'm working on VPS Linux.
Following documentation when I run command ./bin32/sa_config.sh I get this error.
-bash: ./bin32/sa_config.sh: Permission denied
Permission are: -rw-r--r-- 1 root root 1201 Sep 10 14:50 sa_config.sh.
The same is when I run config from bin64.
In phpinfo() I have error:
SQLAnywhere client version The SQLAnywhere client libraries could not be loaded. Please ensure that libdbcapi_r.so can be found in your LD_LIBRARY_PATH environment variable.
I added this line to /etc/init.d/httpd:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/sql_anywhere/
And to this location I copied libdbcapi_r.so and libdblib12_r.so. I tried those files from lib32 and lib64.
I add location to php-5.x.y_sqlanywhere_r.so in php.ini and line to run it automatically.
How to make SQL Anywhere working?
You need to run the sa_config.sh file like this:
. <path>sa_config.sh
Note the space between the . and the filename. That will allow the script to change environment variables in the current shell.
I tried to install and setup a svn server using apache2,
I followed instructions on internet but while i tried to restart apache2 it shows the following error:
apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/authz_svn.load: Cannot load /usr/lib/apache2/modules/mod_authz_svn.so into server: libsvn_repos-1.so.0: cannot open shared object file: No such file or directory
Action 'configtest' failed.
i checked the path but the file do exist,im not sure what is happening.
need some help thanks~
Based on your pathes, it looks like you are playing debian or ubuntu config. if I remember well, this module *mod_authz_svn.so* is available with libapache2-svn, so you need first to apt-get this module as root, and then to enable it (being in the directory /etc/apache2, *a2enmod my_module*) and reload your apache config (or restart apache).
The other way around is to load the module as a DSO. Then it's a different process.