My Apache Server Configuration (under Linux)

xiaoxiao2021-03-06  43

First, select the web server when the most basic configuration installed under Linux is selected, and the HTTPD service is installed, which means that the apache service has been installed, but not started, open this service process as follows: 1, edit / etc The httpd.conf file under the / httpd / conf / directory, find the option (second part), remove the front ##, change the server name to the host name (I am Banaba1), in the back DocumentRoot parameter can be modified The location of our own website. (Later, it was not enough, but also in in the next N row, changed to

Then you install the Apache2.0.53 version, down is the .tar.gz package, first solve the / etc / httpd folder with the TAR XZVF file name, then run ./configure --prefix / etc / httpd / command, specify Install under / etc / httpd. Run Make, generate a compilation file, run Make Install, and perform a long installation process. After the installation is over, use the make Clean command to clear the file generated during the installation process and the files generated during the configuration process. Then in the modification of the configuration file, the client is http://192.168.10.43/, and the Apache success prompt appears. Then start configuring my web ACL list. Built a folder first, MKDIR / ACLTEST. The User Apache Group Apache Permissions #Chown Apache AclTest / # chGRP Apache AclTest / # chmod 500 ACLTEST / Using a INDEX.HTML file in ACLTEST, Touch Index.html uses the VI editor. CREANG AN ACL </ Title> </ head> <body> this is a second page </ body> </ html> After completing ESC, press ZZ (uppercase) to save and drop out. Then in the httpd.conf file, configure the alias to connect. VI httpd.conf finds this of Alias ​​to modify alias / acltest "/ acltest" <directory / acltest> ALOWOVERRIDE ALLALLLOW FROM All </ Directory> The first item is the file that is a specific pointing file. The clip is permissions. Use /etc/rc.d/init.d/httpd restart to restart the HTTPD service. In the client IE, type http://192.168.10.43/acltest to set the page after setting the access control list. The general process is to build an access control file, with the user and password above, with / etc / passwd, which is specifically used for web access. Command is as follows: cd / acltesttouch .htaccess vi .htaccess typing the following code (and no less, less is not hidden files.): AuthUserFile /apachepasswd/.htpasswdAuthGroupFile / dev / null / AuthName "My secret directory" AuthType Basicrequire valid -user quit saving mkdir / apachepasswd # chown apache apachepasswd / # chgrp apache apachepasswd / # chmod 500 apachepasswd with ZZ / build user htpasswd -c /apachepasswd/.htpasswd webuser1New password: webuser1Re-type new password: webuser1 to build several other users, This is not "-c" this time. HTPASSWD /APACHEPASSWD/.htpasswd WebUser2new password: WebUser2re-Type New Password: WebUser2 restarts the HTTPD service. Look at http://192.168.10.43/acltest on the client, request the username and password.</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-74334.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="74334" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.032</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'LgCrk59EQzZldir3gzJ1vzuM3ef5gHzgYRBgnyBTCucUXHokzU4XGAkxMPqrysqP_2BsNcR7FI_2B5zZ5hYj'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>