How to Connect LAMP with ORACLE
128 sudo systemctl restart httpd.service (To restart Apache2)
To develop PHP webapps, you need to setup Apache + MySQL + PHP under your operating system, in a so called LAMP (Linux-Apache-MySQL-PHP), WAMP (Windows-Apache-MySQL-PHP), or MAMP (macOS-Apache-MySQL-PHP) environment.
There are two ways of setting up LAMP/WAMP/MAMP:
- Install individual software components, i.e., (a) Apache, (b) MySQL, (c) PHP, and (d) Other utilities.
- Install a bundle package, which includes all software components (a) to (d) needed for developing PHP webapps.
- Few Commands Which we used Overall to Install the oracle
[android@lamp ~]$ history
1 ls
2 tree /f
3 -l
4 exit
5 cd /
6 cd data2
7 exit
8 php -v
9 mysql --version
10 apache2 -v
11 php --version
12 php -v
13 apache -v
14 mysql --version
15 apache2 -v
16 php -v
17 sudo find / -name apache2
18 find / -name apache2
19 exit
20 php -v
21 apache2 -v
22 mysql --version
23 find / -name apache2
24 exit
25 ls
26 ls dir
27 ls -d */
28 ls -d
29 tree -d
30 echo */
31 ls -l
32 cd /
33 ls -l
34 cd root
35 cd data2
36 ls -l
37 tree -l
38 cd..
39 cd /
40 tree -l
41 php -v
42 php --version
43 mysql -version
44 mysql -v
45 exit
46 php -v
47 apache2 -v
48 mysql --version
49 apache2
50 sudo find / -name apache2
51 ls
52 cd
53 cd var
54 cd /var
55 cd /www
56 cd
57 cd /var/www/
58 mkdir demo
59 sudo mkdir demo
60 mkdir demo
61 sudo su -tomcat
62 su - root
63 sudo find / -name apache2
64 cd /
65 df -kh
66 ls -l /
67 sudo chown -R pooja:developer /data1
68 sudo chown -R developer:pooja /data1
69 man chown
70 sudo chown -R ios:developer /data1
71 ld -l /
72 ls -l
73 sudo find / -name www
74 ls -l /usr/share/
75 ls -l
76 df -kh
77 ip addr
78 sudo netstat -tnlp | grep 'LISTEN'
79 ping 8.8.8.8
80 cd /data2/
81 ls -l
82 cd uploads/
83 ls -l
84 cd /var/www/
85 ls -l
86 cd html/
87 ls -l
88 cd /data2/uploads/
89 ll
90 sudo mv cmms/ /var/www/html/
91 ping 8.8.8.8
92 sudo systemctl enable --now cockpit.socket
93 sudo firewall-cmd --add-service=cockpit --permanent
94 sudo firewall-cmd --reload
95 sudo netstat -tnlp | grep 'LISTEN'
96 sudo df -kh
97 sudo cat /etc/fstab
98 history
99 exit
100 find /home -name *.jpg
101 cd
102 cd..
103 cd/
104 cd /
105 cd \
106 cd /home
107 ls -;
108 ls -l
109 cd..
110 cd -
111 cd --
112 cd -
113 cp /data2/uploads/httpd.conf /etc/httpd/conf/httpd.conf
114 cp /data2/uploads/httpd.conf /etc/httpd/conf/abc.conf
115 cp /data2/uploads/httpd.conf /etc/httpd/conf/abc.txt
116 cp /data2/uploads/httpd.conf /etc/httpd/conf/
117 cp /data2/uploads/Location.php /etc/httpd/conf/
118 cp /data2/uploads/httpd.conf /var/www/html
119 cp /data2/uploads/httpd.conf /var/www/html/
120 cp /data2/uploads/Location.php /var/www/html/
121 sudo cp /data2/uploads/Location.php /var/www/html/
122 sudo mv /data2/uploads/httpd.conf /etc/httpd/conf/.
123 sudo systemctl restart httpd.service
124 sudo systemctl status httpd.service
125 cd /etc/httpd/conf
126 ls -l
127 sudo chown root:root httpd.conf
128 sudo systemctl restart httpd.service
129 sudo systemctl status httpd.service
130 ls -l
131 sudo vim httpd.conf
132 journalctl -xe
133 sudo systemctl restart httpd.service
134 sudo journalctl -xe
135 sudo /sbin/restorecon -v /etc/httpd/conf/httpd.conf
136 sudo systemctl restart httpd.service
137 journalctl -xe
138 sudo journalctl -xe
139 sudo netstat -tnlp | grep LISTEN
140 sudo systemctl status httpd.service
141 sudo netstat -tnlp | grep LISTEN
142 sudo vim httpd.conf
143 sudo systemctl restart httpd.service
144 sudo journalctl -xe
145 sudo reboot
146 cd /tmp/
147 ll
148 exit
149 history
[android@lamp ~]$ sudo systemctl restart httpd.service
[sudo] password for android:
Sorry, try again.
[sudo] password for android:
[android@lamp ~]$ cat /etc/oracle-release
Oracle Linux Server release 8.7
[android@lamp ~]$
[android@lamp ~]$
[android@lamp ~]$
[android@lamp ~]$
[android@lamp ~]$ sudo find / -name tnsnames.ora
[sudo] password for android:
[android@lamp ~]$
[android@lamp ~]$
[android@lamp ~]$
[android@lamp ~]$ sudo find / -name oracle
/etc/pcp/pmlogconf/oracle
/etc/pcp/oracle
/var/lib/pcp/pmdas/oracle
/var/lib/pcp/config/pmlogconf/oracle
/usr/libexec/pcp/pmdas/oracle
/usr/lib/oracle
/usr/include/oracle
/usr/share/oracle
[android@lamp ~]$ ls -l /usr/share/oracle
total 8
drwxr-xr-x. 3 root root 4096 Mar 2 16:10 12.2
drwxr-xr-x. 3 root root 4096 Jan 11 15:35 21
[android@lamp ~]$ ls -l /usr/share/oracle/21
total 4
drwxr-xr-x. 5 root root 4096 Mar 2 19:05 client64
[android@lamp ~]$ ls -l /usr/share/oracle/21/client64/
total 12
drwxr-xr-x. 2 root root 4096 Mar 2 19:05 admin
drwxr-xr-x. 2 root root 4096 Mar 2 19:05 demo
drwxr-xr-x. 2 root root 4096 Mar 2 19:05 doc
[android@lamp ~]$ ls -l /usr/share/oracle/21/client64/admin/
total 12
-rw-r--r--. 1 root root 11465 Jan 11 15:35 oraaccess.xsd
[android@lamp ~]$ ls -l /usr/share/oracle/12.2/
total 4
drwxr-xr-x. 4 root root 4096 Mar 2 16:10 client64
[android@lamp ~]$ ls -l /usr/share/oracle/12.2/client64/
total 8
drwxr-xr-x. 2 root root 4096 Mar 2 19:03 admin
drwxr-xr-x. 2 root root 4096 Mar 2 19:03 demo
[android@lamp ~]$ ls -l /usr/share/oracle/12.2/client64/admin/
total 0
[android@lamp ~]$ ls -l /usr/lib/
alsa/ firmware/ kdump/ oracle/ sysctl.d/
binfmt.d/ fontconfig/ kernel/ ostree/ sysimage/
.build-id/ games/ locale/ polkit-1/ systemd/
cpp gcc/ mdadm/ python3.6/ sysusers.d/
cups/ grub/ modprobe.d/ realmd/ tmpfiles.d/
debug/ java/ modules/ rpm/ tuned/
dracut/ jvm/ modules-load.d/ sendmail udev/
eclipse/ jvm-commmon/ motd.d/ sendmail.postfix
environment.d/ jvm-private/ mozilla/ sse2/
firewalld/ kbd/ NetworkManager/ swidtag/
[android@lamp ~]$ ls -l /usr/lib/oracle/
12.2/ 21/
[android@lamp ~]$ ls -l /usr/lib/oracle/21/client64/
bin/ lib/
[android@lamp ~]$ ls -l /usr/lib/oracle/21/client64/
bin/ lib/
[android@lamp ~]$ ls -l /usr/lib/oracle/21/client64/bin/
adrci genezi
[android@lamp ~]$ ls -l /usr/lib/oracle/21/client64/lib/
libclntshcore.so libclntsh.so.19.1 libocci.so.10.1 libociei.so
libclntshcore.so.21.1 libclntsh.so.20.1 libocci.so.11.1 libocijdbc21.so
libclntsh.so libclntsh.so.21.1 libocci.so.12.1 liboramysql.so
libclntsh.so.10.1 libnnz21.so libocci.so.18.1 network/
libclntsh.so.11.1 libocci_gcc53.so libocci.so.19.1 ojdbc8.jar
libclntsh.so.12.1 libocci_gcc53.so.21.1 libocci.so.20.1 ottclasses.zip
libclntsh.so.18.1 libocci.so libocci.so.21.1 xstreams.jar
[android@lamp ~]$ sudo find / -name oracle
/etc/pcp/pmlogconf/oracle
/etc/pcp/oracle
/var/lib/pcp/pmdas/oracle
/var/lib/pcp/config/pmlogconf/oracle
/usr/libexec/pcp/pmdas/oracle
/usr/lib/oracle
/usr/include/oracle
/usr/share/oracle
[android@lamp ~]$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1029ms
[android@lamp ~]$ sudo find / -name tnsnames
[android@lamp ~]$ sudo yum list oracle-instantclient*
[sudo] password for android:
Last metadata expiration check: 14:04:59 ago on Thursday 02 March 2023 08:06:44 PM IST.
Installed Packages
oracle-instantclient-basic.x86_64 21.9.0.0.0-1.el8 @ol8_oracle_instantclient21
oracle-instantclient-devel.x86_64 21.9.0.0.0-1.el8 @ol8_oracle_instantclient21
oracle-instantclient-release-el8.x86_64 1.0-1.el8 @ol8_baseos_latest
Available Packages
oracle-instantclient-basiclite.x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21
oracle-instantclient-jdbc.x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21
oracle-instantclient-odbc.x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21
oracle-instantclient-release-el8.src 1.0-1.el8 ol8_baseos_latest
oracle-instantclient-sqlplus.x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21
oracle-instantclient-tools.x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21
[android@lamp ~]$ yum install oracle-instantclient-jdbc.x86_64 oracle-instantclient-odbc.x86_64 oracle-instantclient-sqlplus.x86_64 oracle-instantclient-tools. x86_64
Error: This command has to be run with superuser privileges (under the root user on most systems).
[android@lamp ~]$ sudo yum install oracle-instantclient-jdbc.x86_64 oracle-instantclient-odbc.x86_64 oracle-instantclient-sqlplus.x86_64 oracle-instantclient-t ools.x86_64
Last metadata expiration check: 14:07:57 ago on Thursday 02 March 2023 08:06:44 PM IST.
Dependencies resolved.
===============================================================================================================================================================
Package Architecture Version Repository Size
===============================================================================================================================================================
Installing:
oracle-instantclient-jdbc x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21 1.5 M
oracle-instantclient-odbc x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21 247 k
oracle-instantclient-sqlplus x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21 711 k
oracle-instantclient-tools x86_64 21.9.0.0.0-1.el8 ol8_oracle_instantclient21 864 k
Transaction Summary
===============================================================================================================================================================
Install 4 Packages
Total download size: 3.2 M
Installed size: 10 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64.rpm 2.7 MB/s | 711 kB 00:00
(2/4): oracle-instantclient-tools-21.9.0.0.0-1.el8.x86_64.rpm 16 MB/s | 864 kB 00:00
(3/4): oracle-instantclient-jdbc-21.9.0.0.0-1.el8.x86_64.rpm 356 kB/s | 1.5 MB 00:04
(4/4): oracle-instantclient-odbc-21.9.0.0.0-1.el8.x86_64.rpm 53 kB/s | 247 kB 00:04
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 716 kB/s | 3.2 MB 00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : oracle-instantclient-tools-21.9.0.0.0-1.el8.x86_64 1/4
Installing : oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64 2/4
Running scriptlet: oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64 2/4
Installing : oracle-instantclient-odbc-21.9.0.0.0-1.el8.x86_64 3/4
Installing : oracle-instantclient-jdbc-21.9.0.0.0-1.el8.x86_64 4/4
Running scriptlet: oracle-instantclient-jdbc-21.9.0.0.0-1.el8.x86_64 4/4
Verifying : oracle-instantclient-jdbc-21.9.0.0.0-1.el8.x86_64 1/4
Verifying : oracle-instantclient-odbc-21.9.0.0.0-1.el8.x86_64 2/4
Verifying : oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64 3/4
Verifying : oracle-instantclient-tools-21.9.0.0.0-1.el8.x86_64 4/4
Installed:
oracle-instantclient-jdbc-21.9.0.0.0-1.el8.x86_64 oracle-instantclient-odbc-21.9.0.0.0-1.el8.x86_64 oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64
oracle-instantclient-tools-21.9.0.0.0-1.el8.x86_64
Complete!
[android@lamp ~]$
[android@lamp ~]$
[android@lamp ~]$
[android@lamp ~]$
[android@lamp ~]$ sudo find / -name tnsnames.ora
[android@lamp ~]$ sudo find / -name *tnsnames*
find: ‘/proc/49475’: No such file or directory
[android@lamp ~]$ sudo find / -name tnsnames
[android@lamp ~]$ sudo find / -name sqlplus
/usr/lib/oracle/21/client64/bin/sqlplus
/usr/bin/sqlplus
[android@lamp ~]$ ls -l /usr/lib/oracle/21/client64
total 8
drwxr-xr-x. 2 root root 4096 Mar 3 10:14 bin
drwxr-xr-x. 3 root root 4096 Mar 3 10:14 lib
[android@lamp ~]$ sudo find / -name network
find: ‘/proc/49571’: No such file or directory
/etc/sysconfig/network
/etc/pcp/pmieconf/network
/etc/vmware-tools/scripts/vmware/network
/var/lib/pcp/config/pmieconf/network
/var/lib/libvirt/network
/usr/lib/systemd/network
/usr/lib/oracle/21/client64/lib/network
/usr/src/kernels/4.18.0-425.13.1.el8_7.x86_64/include/config/security/network
/usr/src/kernels/4.18.0-425.13.1.el8_7.x86_64/include/config/network
/usr/src/kernels/4.18.0-348.el8.x86_64/include/config/security/network
/usr/src/kernels/4.18.0-348.el8.x86_64/include/config/network
/usr/src/kernels/4.18.0-425.3.1.el8.x86_64/include/config/security/network
/usr/src/kernels/4.18.0-425.3.1.el8.x86_64/include/config/network
/usr/lib64/python3.6/site-packages/pyanaconda/modules/network
/usr/share/systemtap/examples/network
/run/libvirt/network
[android@lamp ~]$ ls -l /usr/lib/oracle/21/client64/lib/network
total 4
drwxr-xr-x. 2 root root 4096 Mar 2 19:03 admin
[android@lamp ~]$ ls -l /usr/lib/oracle/21/client64/lib/network/admin/
total 4
-rw-r--r--. 1 root root 502 Jan 11 15:34 README
[android@lamp ~]$ cat /usr/lib/oracle/21/client64/lib/network/admin/README
============================================================================
This is the default directory for Oracle Network and Oracle Client
configuration files. You can place files such as tnsnames.ora, sqlnet.ora
and oraaccess.xml in this directory.
NOTE:
If you set an environment variable TNS_ADMIN to another directory containing
configuration files, they will be used instead of the files in this default
directory.
============================================================================
[android@lamp ~]$ su - root
Password:
[root@lamp ~]# cd /usr/lib/oracle/21/client64/lib/network/admin/
[root@lamp admin]# ll
total 4
-rw-r--r--. 1 root root 502 Jan 11 15:34 README
[root@lamp admin]# vim tnsnames.ora
[root@lamp admin]# vim sqlnet.ora
[root@lamp admin]# exit
Apache Configuration
The Apache's main configuration file "httpd.conf
" How to Go here :
sudo vim /etc/httpd/conf/httpd.conf
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# See the httpd.conf(5) man page for more information on this configuration,
# and httpd.service(8) on using and configuring the httpd service.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used. If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
#
Listen 80
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache
# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin root@localhost
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80
#
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
#AllowOverride none
#Require all denied
AllowOverride none
Options None
Order allow,deny
Allow from All
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
#
# Relax access to content within /var/www.
#
<Directory "/var/www">
AllowOverride none
## Allow open access:
Require all granted
</Directory>
# Further relax access to the default document root:
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options +Indexes +FollowSymLinks +Multiviews
Options -Indexes
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
#AllowOverride None
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
#Require local
</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ".ht*">
Require all denied
</Files>
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error_log"
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog "logs/access_log" common
#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig /etc/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
# For type maps (negotiated resources):
#AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default. To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
MIMEMagicFile conf/magic
</IfModule>
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#
#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall may be used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on
# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
Post a Comment
0Comments