rewrite - How to transfer old configuration files from Apache 2.2.22 to Apache 2.4.6 -


i new apache, , when updated apache 2.2.22 2.4.6 found default virtual host location put mod_rewrite settings has changed.

for apache2.2.22: in /etc/apache2/sites_enabled/default. apache 2.4.6, changed, document said: "namevirtualhost directiveas" :no longer needed , deprecated.

i have noted seems setting removed apache.conf. here configuration details apache 2.2.22 , 2.4.6.

can tell me need change in configuration?

for apache2.2.22:/etc/apache2/sites_enabled/default

<virtualhost *:80>     serveradmin webmaster@localhost     documentroot /var/www     <directory />             options followsymlinks             allowoverride     </directory>     <directory /var/www/>             options indexes followsymlinks multiviews             allowoverride             order allow,deny             allow     </directory>      scriptalias /cgi-bin/ /usr/lib/cgi-bin/     <directory "/usr/lib/cgi-bin">             allowoverride             options +execcgi -multiviews +symlinksifownermatch             order allow,deny             allow     </directory>      errorlog ${apache_log_dir}/error.log      # possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     loglevel warn      customlog ${apache_log_dir}/access.log combined  alias /doc/ "/usr/share/doc/" <directory "/usr/share/doc/">     options indexes multiviews followsymlinks     allowoverride     order deny,allow     deny     allow 127.0.0.0/255.0.0.0 ::1/128 

<location />    authname "cio internal demo"    authtype basic    authuserfile /etc/apache2/htpasswd.users    require valid-user </location>  <location /liveclass_api/liveclass_callback.php>     satisfy     allow </location>  <location /sp_service.php>     satisfy     allow </location> 

                                                                                   1,1           top 

for apache2.4.6:/etc/apache2/sites_enabled/000-default.conf

<virtualhost *:80>     # servername directive sets request scheme, hostname , port     # server uses identify itself. used when creating     # redirection urls. in context of virtual hosts, servername     # specifies hostname must appear in request's host: header     # match virtual host. default virtual host (this file)     # value not decisive used last resort host regardless.     # however, must set further virtual host explicitly.     #servername www.example.com     serveradmin webmaster@localhost     documentroot /var/www     # available loglevels: trace8, ..., trace1, debug, info, notice, warn,     # error, crit, alert, emerg.     # possible configure loglevel particular     # modules, e.g.     #loglevel info ssl:warn      errorlog ${apache_log_dir}/error.log     customlog ${apache_log_dir}/access.log combined      # configuration files conf-available/,     # enabled or disabled @ global level, possible     # include line 1 particular virtual host. example     # following line enables cgi configuration host     # after has been globally disabled "a2disconf".     #include conf-available/serve-cgi-bin.conf </virtualhost> 

vim: syntax=apache ts=4 sw=4 sts=4 sr noet

part of file apache.conf apache 2.4.6

# include list of ports listen on include ports.conf # sets default security model of apache2 httpd server. # not allow access root filesystem outside of /usr/share , /var/www. # former used web applications packaged in debian, # latter may used local directories served web server. if # system serving content sub-directory in /srv must allow # access here, or in related virtual host. <directory />     options followsymlinks     allowoverride none     require denied </directory>  <directory /usr/share>     allowoverride none     require granted </directory>  <directory /var/www/>     options indexes followsymlinks     allowoverride     require granted </directory>  #<directory /srv/> #       options indexes followsymlinks #       allowoverride none #       require granted #</directory> 


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -