We have an older ubuntu 14 server that is currently working and has apache2 running on and I'm attempting to install an open idc module to get SSO working at our company. I know...Ubuntu 14 is old, but that's a whole other can of worms...
When I run
apachectl -M
It successfully shows auth_openidc_module (shared)
I also verified that ‘auth_openidc.conf’ is in my /etc/apache2/mods-enabled directory
However when I add
in my apache2.conf :
LoadModule auth_openidc_module module/mod_auth_openidc.so
include mods-enabled/auth_openidc.conf
<Location / >
AuthType openid-connect
Require valid-user
</Location>
and perform a 'apachectl -M' command I get the following error.
'Syntax error on line 57 of /etc/apache2/apache2.conf: Cannot load module/mod_auth_openidc.so into server: /etc/apache2/module/mod_auth_openidc.so: cannot open shared object file: No such file or directory
Action '-M' failed.'
Another point of confusion, I don't see any directory named 'auth_openidc_module' or any .so file anywhere within Apache. I have seen some posts that the .so files might be in '/usr/lib64/httpd/modules' but my lib64 directory is blank...
I'm a newbie to all of this...what am I missing?
So I don't have it working successfully yet, but I did get the error 'can't find' error fixed. The directory for modules on our server was '/usr/lib/apache2/modules/' NOT '/usr/lib64/httpd/modules'
I'm trying to add some semblance of security for my website. I've been following this: https://www.tecmint.com/apache-security-tips/ and they want me to edit the httpd file but it doesn't exist in my server. I started doing some more research and I found this https://help.ubuntu.com/lts/serverguide/httpd.html which says it doesn't exist and "all configuration options have been moved to the below referenced directories". So I would appreciate it if someone could tell me which files to add those options to! Also should I edit the apache2.conf file?
Edit: I'm using ubuntu 18.04 LTS
the Main Configuration file for RHEL/CentOS/Fedora is: /etc/httpd/conf/httpd.conf
and for Debian/Ubuntu is: /etc/apache2/apache2.conf.
as you are using ubuntu os so you should edit /etc/apache2/apache2.conf.
for more information and the history about apache2.conf and httpd.conf , as mentioned within ubuntu doc Ubuntu 18.04 Apache2 Web Server Guide:
httpd.conf: historically the main Apache2 configuration file, named
after the httpd daemon. Now the file does not exist. In older versions
of Ubuntu, the file might be present, but empty, as all configuration
options have been moved to the below-referenced directories.
I am trying to set up Apache2 on my Ubuntu system. It's has been installed and working. The problem is that I'm working on an AngularJS project and I need a server for my html pages. Right now the directory is set to:
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
When ever I try to change it to a specific path I always get the 403 Forbidden error. The path I want it changed to is:
/home/michael/dev/JavaScript/AngularJS/Quiz App
When the system is set to the default path and I reload my html page using Sublime Text and I get a 404 error. The html page is:
http://localhost/01_01/index.html
I've been up all night trying to fiqure this out and did the best I could to resolve it. I'm open to any possible solutions you guys may have.
It is because Apache2 does not have permission to access path within your home directory. One thing you can do is to create a symbolic link in /var/www/html and pointing it to your code directory.
ln -s "/home/michael/dev/JavaScript/AngularJS/Quiz App" /var/www/html/quizApp
No open the browser and type localhost/quizApp and you should be able to open your app in the browser
PhpStorm cannot see xdebug but it is installed. In my browser xdebug works fine. Where is the problem?
The error:
Connection with 'xdebug' was not established. Validate installation.
php.ini
[xdebug]
xdebug.idekey=PHPSTORM
zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.default_enable=1
xdebug.coverage_enable=1
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "/tmp"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_autostart=1
phpinfo in phpstorm:
PHP version: 5.4.10
Loaded extensions: bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, XCache, xml, xmlreader, xmlwriter, xsl, yaz, zip, zlib
First, are you using MAMP (free) or MAMP Pro?
Turns out there is a difference between the php.ini file you edit from MAMP and the php.ini file that PhpStorm uses in the interpreter.
The MAMP Pro php.ini file resides in /Library/Application Support/appsolute/MAMP PRO/conf/php.ini and doesn't have a PHP installation (which PhpStorm needs when setting the interpreter). If you run phpinfo(); this is the file you will see data from.
When you set PhpStorm to the necessary location here /Applications/MAMP/bin/php/php5.4.x/bin it looks at the php.ini file there, not the one that MAMP Pro uses (above). So if you want PhpStorm to see the debugger, you need to add the code to that php.ini file.
For help setting up the interpreter for MAMP and PhpStorm refer to the documentation here
HELPFUL HINT: When checking to see if xdebug is installed make sure to run the --version command in terminal from the MAMP php location. Otherwise you'll end up seeing the default OSX PHP info which wouldn't have xdebug installed by default.
Example: run this in the PhpStorm terminal to see if it works /Applications/Mamp/bin/php/php5.4.4/bin/php --version
MAMP using different php.ini if you run it from terminal, try this code to find the php.ini
php -i | grep php.ini
After that add the code for activate the xDebug
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.remote_host=localhost
xdebug.profiler_output_dir="/Applications/MAMP/tmp/xdebug"
xdebug.max_nesting_level=1000
If this work, please consider accept the answer for the benefit the others.
This is because Mac OS X has php installed by default. There are two ini files for MAMP PRO.
PhpStorm will run the default php which you do not add the xdebug function to it.
Read this post for the solution
http://devnet.jetbrains.com/message/5466653
Pay attention to the STEP 5
===================================
okay, if it do not work, I thought u may not pay enough attention to the article, It do helpful and explain the reason, read i again ?
I had similar problem.
I did:
Installed xdebug by following the steps here.
Found out which version of PHP does my PHPStorm use.
Created a new entry in the corresponding php.ini file of the /path/to/xdebug/modules/xdebug.so.
and I was able to solve my problem. xdebug is working now.
I had a similar issue in that it worked then it did not.
In my case, the cause turned out to be an miss placed .htaccess file in the root of the project.
The .htaccess file (repeated below) was there from a previous set of testing and was intended to stop XDebug from working. It sure did.
php_value xdebug.remote_autostart 0
php_value xdebug.remote_enable 0
php_value xdebug.profiler_enable 0
I just renamed the file and like magic, all was good.
I am trying to get my OSX MacPorts install of Apache to NOT show directory listings. I have tried various configurations of the "options" directive in the httpd.conf file with no luck. When I go to the site, it still lists the root directory (there is no index file at the moment.)
Apache has been restarted after each change.
There is no .htaccess file in the / directory, so there shouldn't be anything overriding.
This is driving me crazy!
So basically something is overriding your config. From the documentation of apache we can read that Options is can be placed in various context: server config, virtual host, directory, .htaccess.
httpd.conf is read first, so if You provided the configuration properly there, it means that it is overridden somewhere else
How did You do enter the options in the config ? In the most basic variant it should be.
<Directory /path>
Options -Indexes
</Directory>
Here what you should do:
check module configurations in modules for Options Indexes
check the main virtualhost definition, probably called default or 000-default
If it still does not help, add Options -Indexes to your virtualhost directly (provided you have not done it already). Or add it to the .htaccess file in your directory (allowing Options in .htaccess needs to be switched on)[as suggested in comments]