موقع بوابة بلاد الشام ،belad-alsham
عزيزي آلزآئر
دعوة للانضمام قروب أهل الشام
موقع بوابة بلاد الشام ،belad-alsham
عزيزي آلزآئر
دعوة للانضمام قروب أهل الشام
موقع بوابة بلاد الشام ،belad-alsham
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.



 
الرئيسيةمجلة الشام آخباأحدث الصورالتسجيلدخولrss
قيّم موقع الشام من هنا

مساحة اعلانية br /> مساحة اعلانية
مساحة اعلانية
مساحة اعلانية

 

 لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟

اذهب الى الأسفل 
كاتب الموضوعرسالة
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:19 am



RewriteRule هنا. ولذلك عليك أن تكتب "[E = أي نص مع الفراغات]".
أولا الميزات

هل سوف أباتشي أو بمثابة خادم وكيل؟

mod_proxy يوفر وظائف proxying لمجموعة متنوعة من البروتوكولات.
ما هي "multiviews"؟

"Multiviews" هو الاسم العام الذي يطلق على قدرة خادم أباتشي لتوفير بدائل وثيقة بلغة معينة في استجابة لطلب. تم توثيق هذا جيدا جدا في وصف محتوى الصفحة التفاوض. وبالإضافة إلى ذلك، قامت أباتشي أسبوع مقالا حول هذا الموضوع بعنوان "التفاوض المحتوى أوضح" .
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟

لأنك بحاجة إلى تثبيت وتكوين برنامج نصي لمعالجة الملفات التي تم تحميلها. وغالبا ما تسمى هذه نصي "وضعت" معالج. هناك عدة متاحة، ولكن قد تكون لديهم مشاكل أمنية. قد يؤدي استخدام بروتوكول نقل الملفات المرفوعه يكون أسهل وأكثر أمنا، على الأقل حتى الآن. لمزيد من المعلومات، راجع مقالة صفحات أسبوع النشر أباتشي مع طرح .
كيف يمكن لي أن نعلق تذييل إلى المستندات دون استخدام مباحث أمن الدولة؟

يمكنك إجراء تغييرات تعسفية على وثائق ثابتة عن طريق تكوين 1 العمل التي تطلق نصي CGI. وCGI ثم هو المسؤول عن تحديد نوع المحتوى وتقديم الوثيقة المطلوبة (موقع الذي تم تمريره في متغير البيئة PATH_TRANSLATED)، جنبا إلى جنب مع كل ما هو مطلوب تذييل.
قد مواقع مشغول لا تريد تشغيل برنامج نصي CGI على كل طلب، وينبغي النظر في استخدام وحدة اباتشي لإضافة تذييل. هناك العديد من وحدات طرف ثالث المتاحة من خلال التسجيل وحدة اباتشي التي ستضيف تذييلات إلى وثائق. وتشمل هذه mod_trailer، PHP (php3_auto_append_file)، mod_layout، وmod_perl (أباتشي :: ساندويتش).
لا أباتشي وتشمل محرك البحث؟

أباتشي لا يتضمن محرك البحث، ولكن هناك العديد من جيد محركات البحث التجارية والحرة التي يمكن استخدامها بسهولة مع اباتشي. يتم سرد بعض منها على صفحة موقع ويب أدوات البحث.محركات البحث مفتوحة المصدر التي غالبا ما تستخدم مع اباتشي تشمل HT :/ / حفر وSWISH البريد.
كيف يمكن لي أن تناوب ملفات السجل الخاص بي؟

الجواب بسيط: من خلال الأنابيب السجل نقل إلى أداة السجل المناسب دوران الملف.
ويعد الجواب: في SRC / الدعم / دليل، وسوف تجد أداة مساعدة تسمى rotatelogs والتي يمكن استخدامها من هذا القبيل:
TransferLog "| / الطريق / / rotatelogs مسار / سجلات / الى / / access_log 86400لتمكين تناوب يوميا من ملفات السجل. والحل أكثر تعقيدا من ملف السجل فائدة تناوب منشورة تحت اسم cronolog من موقع أندرو فورد في http://www.cronolog.org/~~V . فإنه يمكن تلقائيا إنشاء الدلائل ملف التسجيل على أساس الوقت والتاريخ، ويمكن أن يكون نقطة الارتباط الرمزي المستمرة لوغفيليس الدورية. (كما في النسخة 1.6.1، cronolog منشورة تحت رخصة أباتشي). استخدام مثل هذا:
CustomLog "| / الطريق / / cronolog - الارتباط الرمزي = / البيرة / المحلية / اباتشى / السجلات / access_log / البيرة / المحلية / اباتشى / السجلات /٪ Y /٪ م / access_log" جنبا إلى جنبكيف يمكنني الحفاظ على طلبات معينة من الظهور في سجلاتي؟

يتم الحصول على أقصى قدر من المرونة لإزالة المعلومات غير المرغوب فيها من ملفات السجل بواسطة سجلات في مرحلة ما بعد المعالجة، أو استخدام أنابيب-سجلات لإطعام السجلات من خلال البرنامج الذي يفعل كل ما تريد. ومع ذلك، لا تقدم أباتشي القدرة على منع يطلب من الظهور من أي وقت مضى في ملفات السجل. يمكنك القيام بذلك عن طريق استخدام SetEnvIf التوجيه لتعيين متغير بيئة لطلبات معينة ثم استخدام مشروط CustomLog بناء الجملة لمنع قطع الأشجار عندما يتم تعيين متغير البيئة.
لا أباتشي دعم أي نوع من التكامل قاعدة البيانات؟

رقم أباتشي هو ويب (HTTP) الخادم، وليس تطبيق الخادم. حزمة قاعدة لا يتضمن أي وظيفة من هذا القبيل. رؤية المشروع PHP ومشروع mod_perl للحصول على أمثلة من وحدات والتي تسمح لك للعمل مع قواعد البيانات من داخل بيئة أباتشي.
يمكنني استخدام صفحات الملقم النشطة (ASP) مع أباتشي؟

خادم الويب اباتشي قاعدة الحزمة لا تتضمن دعم ASP. ومع ذلك، هناك عدد من مشاريع توفر وظائف ASP أو ASP مثل مقابل أباتشي. بعض هذه هي:

  • أباتشي :: ASP
  • mod_mono
انظر أيضا صفحة المشروعات ذات الصلة لمعرفة المزيد.
لا أباتشي تأتي مع دعم جافا؟

خادم الويب اباتشي قاعدة الحزمة لا تشمل تقديم الدعم لجاوة، صفحات خادم جافا، الفول المؤسسة جافا، أو جافا سيرفليتس. هذه الميزات متوفرة كما الإضافات من المشاريع الأخرى مثل أباتشي جيرونيمو و القط .
أسئلة وأجوبة (2012/1/17 19:38:24 التعديل الأخير بواسطة TimBannister )


  • غير قابل للتغيير الصفحة
  • معلومات

  • مزيد من الإجراءات:نص الخام معاينة قبل الطباعة حذف الكاش ------------------------ التدقيق الإملائي مثل صفحات محلي خريطة الموقع ------------------------ إعادة تسمية الصفحة نسخة صفحة حذف صفحة ------------------------ صفحتي الخاصة اشتراك المستخدم ------------------------ إزالة المزعج العودة إلى هذا الإصدار حزمة صفحات تزامن الصفحات ------------------------ تحميل حفظ

الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: رد: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:21 am

Background

What is Apache?

The Apache HTTP Server

is a powerful, flexible, HTTP/1.1 compliant web server
implements the latest protocols, including HTTP/1.1 (RFC2616)
is highly configurable and extensible with third-party modules
can be customised by writing 'modules' using the Apache module API
provides full source code and comes with an unrestrictive license
runs on Windows 2000, Netware 5.x and above, OS/2, and most versions of Unix, as well as several other operating systems
is actively being developed
encourages user feedback through new ideas, bug reports and patches
implements many frequently requested features, including:
DBM databases as well, as relational databases and LDAP for authentication
allows you to easily set up password-protected pages with enormous numbers of authorized users, without bogging down the server.
Customized responses to errors and problems
Allows you to set up files, or even CGI scripts, which are returned by the server in response to errors and problems, e.g. setup a script to intercept 500 Server Errors and perform on-the-fly diagnostics for both users and yourself.
Multiple DirectoryIndex directives - Allows you to say DirectoryIndex index.html index.cgi, which instructs the server to either send back index.html or run index.cgi when a directory URL is requested, whichever it finds in the directory.
Unlimited flexible URL rewriting and aliasing - Apache has no fixed limit on the numbers of Aliases and Redirects which may be declared in the config files. In addition, a powerful rewriting engine can be used to solve most URL manipulation problems.
Content negotiation - i.e. the ability to automatically serve clients of varying sophistication and HTML level compliance, with documents which offer the best representation of information that the client is capable of accepting.
Virtual Hosts - Allows the server to distinguish between requests made to different IP addresses or names (mapped to the same machine). Apache also offers dynamically configurable mass-virtual hosting.
Configurable Reliable Piped Logs - You can configure Apache to generate logs in the format that you want. In addition, on most Unix architectures, Apache can send log files to a pipe, allowing for log rotation, hit filtering, real-time splitting of multiple vhosts into separate logs, and asynchronous DNS resolving on the fly.
How and why was Apache HTTP Server created?

The About Apache document explains how the Apache project evolved from its beginnings as an outgrowth of the NCSA httpd project to its current status as one of the fastest, most efficient, and most functional web servers in existence.

Why the name "Apache"?

The name 'Apache' was chosen from respect for the Native American Indian tribe of Apache (Indé), well-known for their superior skills in warfare strategy and their inexhaustible endurance. For more information on the Apache Nation, we suggest searching Google, or AllTheWeb.

Secondarily, and more popularly (though incorrectly) accepted, it's a considered cute name which stuck. Apache is "A PAtCHy server". It was based on some existing code and a series of "patch files".

These days Apache as such means much more. It's first and foremost the Apache Software Foundation, under which there are dozens of projects.

How does Apache httpd performance compare to other servers?

Benchmarks tend to be a measure of configuration competance, rather than of server quality. That is, if you're an expert in IIS, you can probably get it to run faster than you can get Apache to run. You can therefore find comparisions of various HTTP servers that prove that each is faster than all the others. We tend to take server performance benchmarks with a grain of salt.

How thoroughly tested is Apache httpd?

Apache is run on over 120 million Internet servers (as of April 2010) (Source, Netcraft). It has been tested thoroughly by both developers and users. The Apache HTTP Server Project Management Committee maintains rigorous standards before releasing new versions of their server, and our server runs without a hitch on over one half of all WWW servers available on the Internet. When bugs do show up, we release patches and new versions as soon as they are available.

What are the future plans for Apache httpd?

to continue to be an "open source" no-charge-for-use HTTP server,
to keep up with advances in HTTP protocol and web developments in general,
to collect suggestions for fixes/improvements from its users,
to respond to needs of large volume providers as well as occasional users.
Whom do I contact for support?

See http://httpd.apache.org/support.html.

Is there any more information available on Apache httpd?

Indeed there is. See the main Apache web server site. There are also many books about the Apache HTTP Server available.

Where can I get Apache httpd?

You can find out how to download the source for Apache at the main Apache web server site.

Where can I download (certified) 64 bit Apache httpd binaries for Windows?

Right now, there are none. The Apache Software Foundation produces Open Source Software. The 32 bit binaries provided are a courtesy of the community members.

May I use the Apache logo on my product or Web site?

You may NOT use any original artwork from the Apache Software Foundation, nor make or use modified versions of such artwork, except under the conditions in the Apache Trademark Policy document.

B. General Technical Questions

"Why can't I ...? Why won't ... work?" What to do in case of problems

If you are having trouble with your Apache server software, you should take the following steps:

Check the errorlog!
Apache tries to be helpful when it encounters a problem. In many cases, it will provide some details by writing one or messages to the server error log. Sometimes this is enough for you to diagnose & fix the problem yourself (such as file permissions or the like). The default location of the error log is /usr/local/apache/logs/error_log, but see the ErrorLog directive in your config files for the location on your server.
Check the FAQ!
You're already here.
Check the Apache bug database
Most problems that get reported to The Apache Group are recorded in the bug database. Please check the existing reports, open and closed, before adding one. If you find that your issue has already been reported, please don't add a "me, too" report. If the original report isn't closed yet, we suggest that you check it periodically. You might also consider contacting the original submitter, because there may be an email exchange going on about the issue that isn't getting recorded in the database.
Ask in a user support group
A lot of common problems never make it to the bug database because there's already high Q&A traffic about them in the Users mailing list or comp.infosystems.www.servers.unix and related newsgroups. These newsgroups are also available via Google. Many Apache users, and some of the developers, can be found roaming their virtual halls, so it is suggested that you seek wisdom there. The chances are good that you'll get a faster answer there than from the bug database, even if you don't see your question already posted.
If all else fails, report the problem in the bug database
If you've gone through those steps above that are appropriate and have obtained no relief, then please do let The Apache Group know about the problem by logging a bug report.
If your problem involves the server crashing and generating a core dump, please include a backtrace (if possible). As an example,

# cd ServerRoot
# dbx httpd core
(dbx) where
(Substitute the appropriate locations for your ServerRoot and your httpd and core files. You may have to use gdb instead of dbx.)

How do I submit a patch to Apache httpd?

Detailed information for submitting bug reports and patches may be found in the Apache HTTP Server developer documentation.

Why has Apache stolen my favourite site's Internet address?

The simple answer is: "It hasn't." This misconception is usually caused by the site in question having migrated to the Apache Web server software, but not having migrated the site's content yet. When Apache is installed, the default page that gets installed tells the Webmaster the installation was successful. The expectation is that this default page will be replaced with the site's real content. If it doesn't, complain to the Webmaster, not to the Apache project -- we just make the software and aren't responsible for what people do (or don't do) with it.

Why am I getting spam mail from the Apache site?

The short answer is: "You aren't." Usually when someone thinks the Apache site is originating spam, it's because they've traced the spam to a Web site, and the Web site says it's using Apache. See the previous FAQ entry for more details on this phenomenon.

No marketing spam originates from the Apache site. The only mail that comes from the site goes only to addresses that have been requested to receive the mail.

May I include the Apache software on a CD or other package I'm distributing?

The detailed answer to this question can be found in the Apache license, which is included in the Apache distribution in the file LICENSE. You can also find it on the Web at http://www.apache.org/licenses/.

What's the best hardware/operating system/... How do I get the most out of my Apache Web server?

Check out the performance tuning page.

What are "regular expressions"?

Regular expressions are a way of describing a pattern - for example, "all the words that begin with the letter A" or "every 10-digit phone number" or even "Every sentence with two commas in it, and no capital letter Q". Regular expressions (aka "regex"s) are useful in Apache because they let you apply certain attributes against collections of files or resources in very flexible ways - for example, all .gif and .jpg files under any "images" directory could be written as /images/.*(jpg|gif)$. Note that httpd doesn't need the delimiting // so as to avoid "toothpicks" when matching URIs or paths, like: /\/foo\/bar\/?/

The best overview around is probably the one which comes with Perl. Apache's regular expressions use PCRE - Perl Compatible Regular Expressions.

Why isn't there a binary for my platform?

The developers make sure that the software builds and works correctly on the platforms available to them; this does not necessarily mean that your platform is one of them. In addition, the Apache HTTP server project is primarily source oriented, meaning that distributing valid and buildable source code is the purpose of a release, not making sure that there is a binary package for all of the supported platforms.

If you don't see a kit for your platform listed in the binary distribution area (http://httpd.apache.org/dist/httpd/binaries/), it means either that the platform isn't available to any of the developers, or that they just haven't gotten around to preparing a binary for it. As this is a voluntary project, they are under no obligation to do so. Users are encouraged and expected to build the software themselves.

The sole exception to these practices is the Windows package. Unlike most Unix and Unix-like platforms, Windows systems do not come with a bundled software development environment, so we do prepare binary kits for Windows when we make a release. Again, however, it's a voluntary thing and only a limited number of the developers have the capability to build the InstallShield package, so the Windows release may lag somewhat behind the source release. This lag should be no more than a few days at most.

C. Building Apache httpd

Why do I get an error about an undefined reference to "__inet_ntoa" or other __inet_* symbols?

If you have installed BIND-8 then this is normally due to a conflict between your include files and your libraries. BIND-8 installs its include files and libraries /usr/local/include/ and /usr/local/lib/, while the resolver that comes with your system is probably installed in /usr/include/ and /usr/lib/. If your system uses the header files in /usr/local/include/ before those in /usr/include/ but you do not use the new resolver library, then the two versions will conflict.

To resolve this, you can either make sure you use the include files and libraries that came with your system or make sure to use the new include files and libraries. Adding -lbind to the EXTRA_LDFLAGS line in your Configuration file, then re-running Configure, should resolve the problem. (Apache versions 1.2.* and earlier use EXTRA_LFLAGS instead.)

Note:As of BIND 8.1.1, the bind libraries and files are installed under /usr/local/bind by default, so you should not run into this problem. Should you want to use the bind resolvers you'll have to add the following to the respective lines:

EXTRA_CFLAGS=-I/usr/local/bind/include EXTRA_LDFLAGS=-L/usr/local/bind/lib EXTRA_LIBS=-lbind

I get an error about "configure failed for srclib/apr"

This only applies to Apache 2.4 and later

If you are building with the --with-included-apr option, you also need to download the *-deps tarball that matches the main release that you are trying to build, and extract it into the same directory.

Why won't Apache compile with my system's cc?

If the server won't compile on your system, it is probably due to one of the following causes:

The Configure script doesn't recognize your system environment.
This might be either because it's completely unknown or because the specific environment (include files, OS version, et cetera) isn't explicitly handled. If this happens, you may need to port the server to your OS yourself.
Your system's C compiler is garbage.
Some operating systems include a default C compiler that is either not ANSI C-compliant or suffers from other deficiencies. The usual recommendation in cases like this is to acquire, install, and use gcc.
Your include files may be confused.
In some cases, we have found that a compiler installation or system upgrade has left the C header files in an inconsistent state. Make sure that your include directory tree is in sync with the compiler and the operating system.
Your operating system or compiler may be out of revision.
Software vendors (including those that develop operating systems) issue new releases for a reason; sometimes to add functionality, but more often to fix bugs that have been discovered. Try upgrading your compiler and/or your operating system.
The Apache Group tests the ability to build the server on many different platforms. Unfortunately, we can't test all of the OS platforms there are. If you have verified that none of the above issues is the cause of your problem, and it hasn't been reported before, please submit a problem report. Be sure to include complete details, such as the compiler & OS versions and exact error messages.

Why do I get complaints about redefinition of "struct iovec" when compiling under Linux?

This is a conflict between your C library includes and your kernel includes. You need to make sure that the versions of both are matched properly. There are two workarounds, either one will solve the problem:

Remove the definition of struct iovec from your C library includes. It is located in /usr/include/sys/uio.h. Or, Add -DNO_WRITEV to the EXTRA_CFLAGS line in your Configuration and reconfigure/rebuild. This hurts performance and should only be used as a last resort.

I'm using gcc and I get some compilation errors, what is wrong?

GCC parses your system header files and produces a modified subset which it uses for compiling. This behavior ties GCC tightly to the version of your operating system. So, for example, if you were running IRIX 5.3 when you built GCC and then upgrade to IRIX 6.2 later, you will have to rebuild GCC. Similarly for Solaris 2.4, 2.5, or 2.5.1 when you upgrade to 2.6. Sometimes you can type "gcc -v" and it will tell you the version of the operating system it was built against.

If you fail to do this, then it is very likely that Apache will fail to build. One of the most common errors is with readv, writev, or uio.h. This is not a bug with Apache. You will need to re-install GCC.

D. Error Log Messages and Problems Starting Apache

Why do I get "setgid: Invalid argument" at startup?

Your Group directive (probably in conf/httpd.conf) needs to name a group that actually exists in the /etc/group file (or your system's equivalent). This problem is also frequently seen when a negative number is used in the Group directive (e.g., "Group #-1"). Using a group name -- not group number -- found in your system's group database should solve this problem in all cases.

Why am I getting "httpd: could not set socket option TCP_NODELAY" in my error log?

This message almost always indicates that the client disconnected before Apache reached the point of calling setsockopt() for the connection. It shouldn't occur for more than about 1% of the requests your server handles, and it's advisory only in any case.

Why am I getting "connection reset by peer" in my error log?

This is a normal message and nothing about which to be alarmed. It simply means that the client canceled the connection before it had been completely set up - such as by the end-user pressing the "Stop" button. People's patience being what it is, sites with response-time problems or slow network links may experience this more than high capacity ones or those with large pipes to the network.

The errorlog says Apache dumped core, but where's the dump file?

The error log message about dumped core includes the directory where the dump file should be located. However, many Unixes do not allow a process that has called setuid() to dump core for security reasons ('Is this still a problem?'); the typical Apache setup has the server started as root to bind to port 80, after which it uses setuid() to change UIDs to a non-privileged user to serve requests.

Dealing with this is extremely operating system-specific, and may require rebuilding your system kernel. Consult your operating system documentation or vendor for more information about whether your system does this and how to bypass it. If there is a documented way of bypassing it, it is recommended that you bypass it only for the httpd server process if possible.

The canonical location for Apache's core-dump files is the ServerRoot directory. The location can be set via the CoreDumpDirectory directive to a different directory. Make sure that this directory is writable by the user the server runs as (as opposed to the user the server is started as).

When I run it under Linux I get "shmget: function not found", what should I do?

Your kernel has been built without SysV IPC support. You will have to rebuild the kernel with that support enabled (it's under the "General Setup" submenu). Documentation for kernel building is beyond the scope of this FAQ; you should consult the Kernel HOWTO, or the documentation provided with your distribution, or a Linux newsgroup/mailing list. As a last-resort workaround, you can comment out the #define USE_SHMGET_SCOREBOARD definition in the LINUX section of src/conf.h and rebuild the server (prior to 1.3b4, simply removing #define HAVE_SHMGET would have sufficed). This will produce a server which is slower and less reliable.

Server hangs, or fails to start, and/or error log fills with "fcntl: F_SETLKW: No record locks available" or similar messages

These are symptoms of a file locking problem, which usually means that the server is trying to use a synchronization file on an NFS filesystem.

Because of its parallel-operation model, the Apache Web server needs to provide some form of synchronization when accessing certain resources. One of these synchronization methods involves taking out locks on a file, which means that the filesystem whereon the lockfile resides must support locking. In many cases this means it can't be kept on an NFS-mounted filesystem.

To cause the Web server to work around the NFS locking limitations, include a line such as the following in your server configuration files:


LockFile /var/run/apache-lock
The directory should not be generally writable (e.g., don't use /var/tmp). See the LockFile documentation for more information.

When I try to start Apache from a DOS window, I get a message like "Cannot determine host name. Use ServerName directive to set it manually." What does this mean?

It means what it says; the Apache software can't determine the hostname of your system. Edit your conf\httpd.conf file, look for the string "ServerName", and make sure there's an uncommented directive such as

ServerName localhost or

ServerName www.foo.com in the file. Correct it if there one there with wrong information, or add one if you don't already have one.

Also, make sure that your Windows system has DNS enabled. See the TCP/IP setup component of the Networking or Internet Options control panel.

After verifying that DNS is enabled and that you have a valid hostname in your ServerName directive, try to start the server again.

When I try to start Apache on Windows, I get a message like "System error 1067 has occurred. The process terminated unexpectedly." What does this mean?

This message means that the Web server was unable to start correctly for one reason or another. To find out why, execute the following commands in a DOS window:

c: cd "\Program Files\Apache Group\Apache" apache
(If you don't get the prompt back, hit Control-C to cause Apache to exit.)

The error you see will probably be one of those preceding this question in the FAQ.

First check the Windows NT Event Log for Application errors using the Windows NT/2000 Event Viewer program. Any errors that occur prior to opening the Apache error log will be stored here, if Apache is run as a Service on NT or 2000. As with any error, also check your Apache error log.

On a SuSE Linux system, I try and configure access control using basic authentication. Although I follow the example exactly, authentication fails, and an error message "admin: not a valid FDN: ...." is logged.

In the SuSE distribution, additional 3rd party authentication modules have been added and activated by default. These modules interfere with the Apache standard modules and cause Basic authentication to fail. Our recommendation is to comment all those modules in /etc/httpd/suse_addmodule.conf and /etc/httpd/suse_loadmodule.conf which are not actually required for running your server.

Why am I getting server restart messages periodically, when I did not restart the server?

Problem: You are noticing restart messages in your error log, periodically, when you know you did not restart the server yourself:


[Thu Jun 6 04:02:01 2002] [notice] SIGHUP received. Attempting to restart
[Thu Jun 6 04:02:02 2002] [notice] Apache configured -- resuming normal operations
Check your cron jobs to see when/if your server logs are being rotated. Compare the time of rotation to the error message time. If they are the same, you can somewhat safely assume that the restart is due to your server logs being rotated.

Why am I getting "module module-name is not compatible with this version of Apache" messages in my error log?

Module Magic Number (MMN) is a constant defined in Apache source that is associated with binary compatibility of modules. It is changed when internal Apache structures, function calls and other significant parts of API change in such a way that binary compatibility cannot be guaranteed any more. On MMN change, all third party modules have to be at least recompiled, sometimes even slightly changed in order to work with the new version of Apache.

If you're getting the above error messages, contact the vendor of the module for the new binary, or compile it if you have access to the source code.

E. Configuration Questions

Why can't I run more than <n> virtual hosts?

You are probably running into resource limitations in your operating system. The most common limitation is the per-process limit on file descriptors, which is almost always the cause of problems seen when adding virtual hosts. Apache often does not give an intuitive error message because it is normally some library routine (such as gethostbyname()) which needs file descriptors and doesn't complain intelligibly when it can't get them.

Each log file requires a file descriptor, which means that if you are using separate access and error logs for each virtual host, each virtual host needs two file descriptors. Each Listen directive also needs a file descriptor.

Typical values for <n> that we've seen are in the neighborhood of 1024 or 2048. When the server bumps into the file descriptor limit, it may dump core with a SIGSEGV, it might just hang, or it may limp along and you'll see (possibly meaningful) errors in the error log. One common problem that occurs when you run into a file descriptor limit is that CGI scripts stop being executed properly.

As to what you can do about this:

Reduce the number of Listen directives
If there are no other servers running on the machine on the same port then you normally don't need any Listen directives at all. By default Apache listens to all addresses on port 80.
Reduce the number of log files
You can use mod_log_config to log all requests to a single log file while including the name of the virtual host in the log file. You can then write a script to split the logfile into separate files later if necessary. Such a script is provided with the Apache distribution in the src/support/split-logfile file.
Increase the number of file descriptors available to the server
(see your system's documentation on the limit or ulimit commands). For some systems, information on how to do this is available in the performance hints page. There is a specific note for FreeBSD below.
"Don't do that" - try to run with fewer virtual hosts
Spread your operation across multiple server processes (using Listen for example, but see the first point) and/or ports. Since this is an operating-system limitation, there's not much else available in the way of solutions.

Why doesn't my ErrorDocument 401 work?

You need to use it with a URL in the form "/foo/bar" and not one with a method and hostname such as "http://host/foo/bar". See the ErrorDocument documentation for details. This was incorrectly documented in the past.

Why does Apache send a cookie on every response?

Apache does not automatically send a cookie on every response, unless you have re-compiled it with the mod_usertrack module, and specifically enabled it with the CookieTracking directive. This module may help track users, and uses cookies to do this. If you are not using the data generated by mod_usertrack, do not compile it into Apache.

Why don't my cookies work?

Apache httpd passes on your Set-Cookie header, like any other header. If cookies do not work it will be because your script does not work properly or your browser does not use cookies or is not set-up to accept them.

How do I add browsers and referrers to my logs?

Apache provides a couple of different ways of doing this. The recommended method is to compile the mod_log_config module into your configuration and use the CustomLog directive.

You can either log the additional information in files other than your normal transfer log, or you can add them to the records already being written. For example:

CustomLog logs/access_log "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""

This will add the values of the User-agent: and Referer: headers, which indicate the client and the referring page, respectively, to the end of each line in the access log.

You may want to check out the Apache Week article entitled: "Gathering Visitor Information: Customizing Your Logfiles".

Why does accessing directories only work when I include the trailing "/" (e.g., http://foo.domain.com/~user/) but not when I omit it (e.g., http://foo.domain.com/~user)?

When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.

Add a ServerName directive to the config file to tell it what the domain name of the server is.

The other thing that can occasionally cause this symptom is a misunderstanding of the Alias directive, resulting in an alias working with a trailing slash, and not without one. The Alias directive is very literal, and aliases what you tell it to. Consider the following example:

Alias /example/ /home/www/example/
The above directive creates an alias for URLs starting with /example/, but does not alias URLs starting with /example. That is to say, a URL such as http://servername.com/example/ will get the desired content, but a URL such as http://servername.com/example will result in a "file not found" error.

The following Alias, on the other hand, will work for both cases:

Alias /example /home/www/example
Why doesn't mod_info list any directives?

The mod_info module allows you to use a Web browser to see how your server is configured. Among the information it displays is the list of modules and their configuration directives. The "current" values for the directives are not necessarily those of the running server; they are extracted from the configuration files themselves at the time of the request. If the files have been changed since the server was last reloaded, the display will not match the values actively in use. If the files and the path to the files are not readable by the user as which the server is running (see the User directive), then mod_info cannot read them in order to list their values. An entry will be made in the error log in this event, however.

My .htaccess files are being ignored.

This is almost always due to your AllowOverride directive being set incorrectly for the directory in question. If it is set to None then .htaccess files will not even be looked for. That is a good thing. If you have access to edit the httpd.conf, you should not use .htaccess files, ever. If your customers do need support for .htaccess, make sure that AllowOverride is set to something sensible (i.e.: Not All). Be certain it covers the directory you are trying to use the .htaccess file in. This is normally accomplished by ensuring it is inside the proper Directory container.

You can tell if this is your problem by adding nonsense text to your .htaccess file and reloading the page. If you do not get a server error, then Apache httpd is not reading your .htaccess file.

Why do I get a "Forbidden" message whenever I try to access a particular directory?

This message is generally caused because either
الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: رد: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:22 am



The underlying file system permissions do not allow the User/Group under which Apache is running to access the necessary files; or
The Apache configuration has some access restrictions in place which forbid access to the files.
You can determine which case applies to your situation by checking the error log.

In the case where file system permission are at fault, see (13) Permission Denied for more info.

Why do my files appear correctly in Internet Explorer, but show up as source or trigger a save window with Netscape; or, Why doesn't Internet Explorer render my text/plain document correctly?

MS Internet Explorer (MSIE) and Netscape handle mime type detection in different ways, and therefore will display the document differently. In particular, IE sometimes relies on the file extension or the contents of the file to determine the mime type. This can happen when the server specifies a mime type of application/octet-stream or text/plain. This behavior violates the the HTTP standard and makes it impossible to deliver plain text documents to MSIE clients in some cases. More details are available on MSIE's mime type detection behavior in an MSDN article and a note by Alan J. Flavell.

The best you can do as a server administrator is to accurately configure the mime type of your documents by editing the mime.types file or using an AddType directive in the Apache configuration files. In some cases, you may be able to fool MSIE into rendering text/plain documents correctly by assuring they have a .txt filename extension, but this will not work if MSIE thinks the content looks like another file type.

My site is accessible under many different hostnames; how do I redirect clients so that they see only a single name?

Many sites map a variety of hostnames to the same content. For example, www.example.com, example.com and www.example.net may all refer to the same site. It is best to make sure that, regardless of the name clients use to access the site, they will be redirected to a single, canonical hostname. This makes the site easier to maintain and assures that there will be only one version of the site in proxy caches and search engines.

There are two techniques to implement canonical hostnames:

Use mod_rewrite as described in the "Canonical Hostnames" section of the URL Rewriting Guide.

See http://httpd.apache.org/docs/current/rewrite/rewrite_guide.html#canonicalurl.

Use name-based virtual hosting:

NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.example.net
ServerAlias example.com
Redirect permanent / http://www.example.com/
</VirtualHost>

<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>
Why can I access my website from the server or from my local network, but I can't access it from elsewhere on the Internet?

There are many possible reasons for this, and almost all of them are related to the configuration of your network, not the configuration of the Apache HTTP Server. One of the most common problems is that a firewall blocks access to the default HTTP port 80. In particular, many consumer ISPs block access to this port. You can see if this is the case by changing any Port and Listen directives in httpd.conf to use port 8000 and then request your site using http://yourhost.example.com:8000/. (Of course, a very restrictive firewall may block this port as well.)

How do I turn automatic directory listings on or off?

If a client requests a URL that designates a directory and the directory does not contain a filename that matches the DirectoryIndex directive, then mod_autoindex can be configured to present a listing of the directory contents.

To turn on automatic directory indexing, find the Options directive that applies to the directory and add the Indexes keyword. For example:

<Directory /path/to/directory>
Options +Indexes
</Directory>
To turn off automatic directory indexing, remove the Indexes keyword from the appropriate Options line. To turn off directory listing for a particular subdirectory, you can use Options -Indexes. For example:

<Directory /path/to/directory>
Options -Indexes
</Directory>
Why do my Options directives not have the desired effect?

Directives placed in the configuration files are applied in a very particular order, as described by How Directory, Location, and Files sections work. In addition, each Options directive has the effect of resetting the options to none before adding the specified options (unless only "+" and "-" options are used). The consequence is that Options set in the main server or virtual host context (outside any directory, location, or files section) will usually have no effect, because they are overridden by more specific Options directives. For example, in the following


<Directory /usr/local/apache/htdocs>
Options Indexes
</Directory>
Options Includes ExecCGI
Includes and ExecCGI will be off in the /usr/local/apache/htdocs directory.

You can usually avoid problems by either finding the Options directive that already applies to a specific directory and changing it, or by putting your Options directive inside the most specific possible <Directory> section.

How can I change the information that Apache returns about itself in the headers?

When a client connects to Apache, part of the information returned in the headers is the name "Apache" Additional information that can be sent is the version number, such as "2.2.17", the operating system, and a list of non-standard modules you have installed.

For example:

Server: Apache/2.2.17 (Unix) mod_perl/1.26 Frequently, people want to remove this information, under the mistaken understanding that this will make the system more secure. This is probably not the case, as the same exploits will likely be attempted regardless of the header information you provide.

There are, however, two answers to this question: the correct answer, and the answer that you are probably looking for.

The correct answer to this question is that you should use the ServerTokens directive to alter the quantity of information which is passed in the headers. Setting this directive to Prod will pass the least possible amount of information:

Server: Apache The answer you are probably looking for is how to make Apache lie about what what it is, ie send something like:

Server: Bob's Happy HTTPd Server In order to do this, you will need to modify the Apache source code and rebuild Apache. This is not advised, as it is almost certain not to provide you with the added security you think that you are gaining. The exact method of doing this is left as an exercise for the reader, as we are not keen on helping you do something that is intrinsically a bad idea.

Why do I see requests for other sites appearing in my log files?

An access_log entry showing this situation could look like this:

63.251.56.142 - - [25/Jul/2002:12:48:04 -0700] "GET http://www.yahoo.com/ HTTP/1.0" 200 1456 The question is: why did a request for www.yahoo.com come to your server instead of Yahoo's server? And why does the response have a status code of 200 (success)?

This is usually the result of malicious clients trying to exploit open proxy servers to access a website without revealing their true location. If you find entries like this in your log, the first thing to do is to make sure you have properly configured your server not to proxy for unknown clients. If you don't need to provide a proxy server at all, you should simply assure that the ProxyRequests directive is not set on. If you do need to run a proxy server, then you must ensure that you secure your server properly so that only authorized clients can use it.

If your server is configured properly, then the attempt to proxy through your server will fail. If you see a status code of 404 (file not found) in the log, then you know that the request failed. If you see a status code of 200 (success), that does not necessarily mean that the attempt to proxy succeeded. RFC2616 section 5.1.2 mandates that Apache must accept requests with absolute URLs in the request-URI, even for non-proxy requests. Since Apache has no way to know all the different names that your server may be known under, it cannot simply reject hostnames it does not recognize. Instead, it will serve requests for unknown sites locally by stripping off the hostname and using the default server or virtual host. Therefore you can compare the size of the file (1456 in the above example) to the size of the corresponding file in your default server. If they are the same, then the proxy attempt failed, since a document from your server was delivered, not a document from www.yahoo.com.

If you wish to prevent this type of request entirely, then you need to let Apache know what hostnames to accept and what hostnames to reject. You do this by configuring name-virtual hosts, where the first listed host is the default host that will catch and reject unknown hostnames. For example:


NameVirtualHost *:80

<VirtualHost *:80>
ServerName default.only
<Location />
Order allow,deny
Deny from all
</Location>
</VirtualHost>

<VirtualHost *:80>
ServerName realhost1.example.com
ServerAlias alias1.example.com alias2.example.com
DocumentRoot /path/to/site1
</VirtualHost>
...
F. Dynamic Content (CGI and SSI)

How do I enable CGI execution in directories other than the ScriptAlias?

Apache recognizes all files in a directory named as a ScriptAlias as being eligible for execution rather than processing as normal documents. This applies regardless of the file name, so scripts in a ScriptAlias directory don't need to be named "*.cgi" or "*.pl" or whatever. In other words, all files in a ScriptAlias directory are scripts, as far as Apache is concerned.

To persuade Apache to execute scripts in other locations, such as in directories where normal documents may also live, you must tell it how to recognize them - and also that it's okay to execute them. For this, you need to use something like the AddHandler directive.

In an appropriate section of your server configuration files, add a line such as AddHandler cgi-script .cgi The server will then recognize that all files in that location (and its logical descendants) that end in ".cgi" are script files, not documents.

Make sure that the directory location is covered by an Options declaration that includes the ExecCGI option. In some situations, you might not want to actually allow all files named "*.cgi" to be executable. Perhaps all you want is to enable a particular file in a normal directory to be executable. This can be alternatively accomplished via mod_rewrite and the following steps:

Locally add to the corresponding .htaccess file a ruleset similar to this one:

RewriteEngine on
RewriteBase /~foo/bar/
RewriteRule ^quux\.cgi$ - [T=application/x-httpd-cgi]
Make sure that the directory location is covered by an Options declaration that includes the ExecCGI and FollowSymLinks option.

What does it mean when my CGIs fail with "Premature end of script headers"?

It means just what it says: the server was expecting a complete set of HTTP headers (one or more followed by a blank line), and didn't get them.

The most common cause of this problem is the script dying before sending the complete set of headers, or possibly any at all, to the server. To see if this is the case, try running the script standalone from an interactive session, rather than as a script under the server. If you get error messages, this is almost certainly the cause of the "premature end of script headers" message. Even if the CGI runs fine from the command line, remember that the environment and permissions may be different when running under the web server. The CGI can only access resources allowed for the User and Group specified in your Apache configuration. In addition, the environment will not be the same as the one provided on the command line, but it can be adjusted using the directives provided by mod_env.

The second most common cause of this (aside from people not outputting the required headers at all) is a result of an interaction with Perl's output buffering. To make Perl flush its buffers after each output statement, insert the following statements around the print or write statements that send your HTTP headers:


{
my $current_file_handle = select (STDOUT);
local $| = 1;
#
# print your HTTP headers here
#
select ($current_file_handle);
}
This is generally only necessary when you are calling external programs from your script that send output to stdout, or if there will be a long delay between the time the headers are sent and the actual content starts being emitted. To maximize performance, you should turn buffer-flushing back off (with $| = 0 or the equivalent) after the statements that send the headers, as displayed above.

If your script isn't written in Perl, do the equivalent thing for whatever language you are using (e.g., for C, call fflush() after writing the headers).

Another cause for the "premature end of script headers" message are the RLimitCPU and RLimitMEM directives. You may get the message if the CGI script was killed due to a resource limit.

In addition, a configuration problem in suEXEC, mod_perl, or another third party module can often interfere with the execution of your CGI and cause the "premature end of script headers" message.

Why do I keep getting "Method Not Allowed" for form POST requests?

This is almost always due to Apache not being configured to treat the file you are trying to POST to as a CGI script. You can not POST to a normal HTML file; the operation has no meaning. See the FAQ entry on CGIs outside ScriptAliased directories for details on how to configure Apache to treat the file in question as a CGI.

How do I enable SSI (parsed HTML)?

SSI (an acronym for Server-Side Include) directives allow static HTML documents to be enhanced at run-time (e.g., when delivered to a client by Apache). The format of SSI directives is covered in the mod_include manual; suffice it to say that Apache supports not only SSI but xSSI (eXtended SSI) directives.

Processing a document at run-time is called parsing it; hence the term "parsed HTML" sometimes used for documents that contain SSI instructions. Parsing tends to be resource-consumptive compared to serving static files, and is not enabled by default. It can also interfere with the cachability of your documents, which can put a further load on your server. (See the next question for more information about this.)

To enable SSI processing, you need to

Build your server with the mod_include module. This is normally compiled in by default.
Make sure your server configuration files have an Options directive which permits Includes.
Make sure that the directory where you want the SSI documents to live is covered by the "INCLUDEES" content filter, either explicitly or in some ancestral location. That can be done with the following directives:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
This indicates that all files ending in ".shtml" in that location (or its descendants) should be parsed. Note that using ".html" will cause all normal HTML files to be parsed, which may put an inordinate load on your server.

For additional information, see the mod_include documentation.

Why don't my parsed files get cached?

Since the server is performing run-time processing of your SSI directives, which may change the content shipped to the client, it can't know at the time it starts parsing what the final size of the result will be, or whether the parsed result will always be the same. This means that it can't generate Content-Length or Last-Modified headers. Caches commonly work by comparing the Last-Modified of what's in the cache with that being delivered by the server. Since the server isn't sending that header for a parsed document, whatever's doing the caching can't tell whether the document has changed or not - and so fetches it again to be on the safe side.

You can work around this in some cases by causing an Expires header to be generated. (See the mod_expires documentation for more details.) Another possibility is to use the XBitHack Full mechanism, which tells Apache to send (under certain circumstances detailed in the XBitHack directive description) a Last-Modified header based upon the last modification time of the file being parsed. Note that this may actually be lying to the client if the parsed file doesn't change but the SSI-inserted content does; if the included content changes often, this can result in stale copies being cached.

How can I have my script output parsed?

So you want to include SSI directives in the output from your CGI script, but can't figure out how to do it? The short answer is "you can't." This is potentially a security liability and, more importantly, it can not be cleanly implemented under the current server API. The best workaround is for your script itself to do what the SSIs would be doing. After all, it's generating the rest of the content.

SSIs don't work for VirtualHosts and/or user home directories.

This is almost always due to having some setting in your config file that sets "Options Includes" or some other setting for your DocumentRoot but not for other directories. If you set it inside a Directory section, then that setting will only apply to that directory.

Why is the environment variable REMOTE_USER not set?

This variable is set and thus available in SSI or CGI scripts if and only if the requested document was protected by access authentication. For an explanation on how to implement these restrictions, see Apache Week's articles on Using User Authentication or DBM User Authentication.

Hint: When using a CGI script to receive the data of a HTML FORM, notice that protecting the document containing the FORM is not sufficient to provide REMOTE_USER to the CGI script. You have to protect the CGI script, too. Or alternatively only the CGI script (then authentication happens only after filling out the form).

How do I allow each of my user directories to have a cgi-bin directory?

Remember that CGI execution does not need to be restricted only to cgi-bin directories. You can allow CGI script execution in arbitrary parts of your filesystem.

There are many ways to give each user directory a cgi-bin directory such that anything requested as http://example.com/~user/cgi-bin/program will be executed as a CGI script. Two alternatives are:

Place the cgi-bin directory next to the public_html directory:

ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
Place the cgi-bin directory underneath the public_html directory:
<Directory /home/*/public_html/cgi-bin>
Options ExecCGI
SetHandler cgi-script
</Directory>
If you are using suexec, the first technique will not work because CGI scripts must be stored under the public_html directory.

G. Authentication and Access Restrictions

Why isn't restricting access by host or domain name working correctly?

Two of the most common causes of this are:

An error, inconsistency, or unexpected mapping in the DNS registration
This happens frequently: your configuration restricts access to Host.FooBar.Com, but you can't get in from that host. The usual reason for this is that Host.FooBar.Com is actually an alias for another name, and when Apache performs the address-to-name lookup it's getting the real name, not Host.FooBar.Com. You can verify this by checking the reverse lookup yourself. The easiest way to work around it is to specify the correct host name in your configuration.

Inadequate checking and verification in your configuration of Apache
If you intend to perform access checking and restriction based upon the client's host or domain name, you really need to configure Apache to double-check the origin information it's supplied. You do this by adding this to your configuration:

HostnameLookups Double
This will cause Apache to be very paranoid about making sure a particular host address is really assigned to the name it claims to be. Note that this can incur a significant performance penalty, however, because of all the name resolution requests being sent to a nameserver.

How do I set up Apache to require a username and password to access certain documents?

There are several ways to do this; some of the more popular ones are to use the mod_authn_file, mod_authn_dbd, or mod_authnz_ldap modules.

For an explanation on how to implement these restrictions, see the authentication tutorial in the Apache HTTP Server documentation.

How do I set up Apache to allow access to certain documents only if a site is either a local site or the user supplies a password and username?

Use the Satisfy directive, in particular the Satisfy Any directive, to require that only one of the access restrictions be met. For example, adding the following configuration to a .htaccess or server configuration file would restrict access to people who either are accessing the site from a host under domain.com or who can supply a valid username and password:


Deny from all
Allow from .domain.com
AuthType Basic
AuthUserFile /usr/local/apache/conf/htpasswd.users
AuthName "special directory"
Require valid-user
Satisfy any
See the user authentication question and the mod_authnz_host module for details on how the above directives work.

Why does my authentication give me a server error?

Under normal circumstances, the Apache access control modules will pass unrecognized user IDs on to the next access control module in line. Only if the user ID is recognized and the password is validated (or not) will it give the usual success or "authentication failed" messages.

However, if the last access module in line 'declines' the validation request (because it has never heard of the user ID or because it is not configured), the http_request handler will give one of the following, confusing, errors:

check access
check user. No user file?
check access. No groups file?
This does not mean that you have to add an 'AuthUserFile /dev/null' line as some magazines suggest!

The solution is to ensure that at least the last module is authoritative and CONFIGURED. By default, mod_auth is authoritative and will give an OK/Denied, but only if it is configured with the proper AuthUserFile. Likewise, if a valid group is required. (Remember that the modules are processed in the reverse order from that in which they appear in your compile-time Configuration file.)

A typical situation for this error is when you are using the mod_auth_dbm, mod_auth_msql, mod_auth_mysql, mod_auth_anon or mod_auth_cookie modules on their own. These are by default not authoritative, and this will pass the buck on to the (non-existent) next authentication module when the user ID is not in their respective database. Just add the appropriate 'XXXAuthoritative yes' line to the configuration.

In general it is a good idea (though not terribly efficient) to have the file-based mod_auth a module of last resort. This allows you to access the web server with a few special passwords even if the databases are down or corrupted. This does cost a file open/seek/close for each request in a protected area.

Do I have to keep the (SQL) authentication information on the same machine?

Some organizations feel very strongly about keeping the authentication information on a different machine than the webserver. With the mod_auth_msql, mod_auth_mysql, and other SQL modules connecting to (R)DBMses this is quite possible. Just configure an explicit host to contact.

Be aware that with mSQL and Oracle, opening and closing these database connections is very expensive and time consuming. You might want to look at the code in the auth_* modules and play with the compile time flags to alleviate this somewhat, if your RDBMS licences allow for it.

Can I use my /etc/passwd file for Web page authentication?

Yes, you can - but it's a very bad idea. Here are some of the reasons:

The Web technology provides no governors on how often or how rapidly password (authentication failure) retries can be made. That means that someone can hammer away at your system's root password using the Web, using a dictionary or similar mass attack, just as fast as the wire and your server can handle the requests. Most operating systems these days include attack detection (such as n failed passwords for the same account within m seconds) and evasion (breaking the connection, disabling the account under attack, disabling all logins from that source, et cetera), but the Web does not.
An account under attack isn't notified (unless the server is heavily modified); there's no "You have 19483 login failures" message when the legitimate owner logs in.
Without an exhaustive and error-prone examination of the server logs, you can't tell whether an account has been compromised. Detecting that an attack has occurred, or is in progress, is fairly obvious, though - if you look at the logs.
Web authentication passwords (at least for Basic authentication) generally fly across the wire, and through intermediate proxy systems, in what amounts to plain text. "O'er the net we go/Caching all the way;/O what fun it is to surf/Giving my password away!"
Since HTTP is stateless, information about the authentication is transmitted each and every time a request is made to the server. Essentially, the client caches it after the first successful access, and transmits it without asking for all subsequent requests to the same server.
It's relatively trivial for someone on your system to put up a page that will steal the cached password from a client's cache without them knowing. Can you say "password grabber"?
If you still want to do this in light of the above disadvantages, the method is left as an exercise for the reader. It'll void your Apache warranty, though, and you'll lose all accumulated UNIX guru points.

Why does Apache ask for my password twice before serving a file?

If the hostname under which you are accessing the server is different than the hostname specified in the ServerName directive, then depending on the setting of the UseCanonicalName directive, Apache will redirect you to a new hostname when constructing self-referential URLs. This happens, for example, in the case where you request a directory without including the trailing slash.

When this happens, Apache will ask for authentication once under the original hostname, perform the redirect, and then ask again under the new hostname. For security reasons, the browser must prompt again for the password when the host name changes.

To eliminate this problem you should

Always use the trailing slash when requesting directories;
Change the ServerName to match the name you are using in the URL;
and/or Set UseCanonicalName off.
How can I prevent people from "stealing" the images from my web site?

The goal here is to prevent people from inlining your images directly from their web site, but accessing them only if they appear inline in your pages.

This can be accomplished with a combination of SetEnvIf and the Deny and Allow directives. However, it is important to understand that any access restriction based on the REFERER header is intrinsically problematic due to the fact that browsers can send an incorrect REFERER, either because they want to circumvent your restriction or simply because they don't send the right thing (or anything at all).

The following configuration will produce the desired effect if the browser passes correct REFERER headers.


SetEnvIf REFERER "www\.mydomain\.com" linked_from_here
SetEnvIf REFERER "^$" linked_from_here

<Directory /www/images>
Order deny,allow
Deny from all
Allow from env=linked_from_here
</Directory>
Further examples can be found in the Environment Variables documentation.

H. URL Rewriting

Where can I find mod_rewrite rulesets which already solve particular URL-related problems?

There is a collection of practical solutions that can be found in the URL Rewriting Guide. If you have more interesting rulesets which solve particular problems not currently covered in this document, open a doc suggestion in bugzilla to add it. The other webmasters will thank you for avoiding the reinvention of the wheel.

Where can I find any published information about URL-manipulations and mod_rewrite?

There is an article from Ralf S. Engelschall about URL-manipulations based on mod_rewrite in the "iX Multiuser Multitasking Magazin" issue #12/96. The German (original) version can be read online at <http://www.heise.de/ix/artikel/1996/12/149/>, the English (translated) version can be found at <http://www.heise.de/ix/artikel/E/1996/12/149/>.

Why is mod_rewrite so difficult to learn and seems so complicated?

Hmmm... there are a lot of reasons. First, mod_rewrite itself is a powerful module which can help you in really all aspects of URL rewriting, so it can be no trivial module per definition. To accomplish its hard job it uses software leverage and makes use of a powerful regular expression library by Henry Spencer. And regular expressions itself can be difficult to newbies, while providing the most flexible power to the advanced hacker.

On the other hand mod_rewrite has to work inside the Apache API environment and needs to do some tricks to fit there. For instance the Apache API really was not designed for URL rewriting at the .htaccess level of processing. Or the problem of multiple rewrites in sequence, which is also not handled by the API per design. To provide this features mod_rewrite has to do some special (but API compliant!) handling which leads to difficult processing inside the Apache kernel. While the user usually doesn't see anything of this processing, it can be difficult to find problems when some of your RewriteRules seem not to work.

What can I do if my RewriteRules don't work as expected?

Use "RewriteLog somefile" and "RewriteLogLevel 9" and have a precise look at the steps the rewriting engine performs. This is really the only one and best way to debug your rewriting configuration.

Why don't some of my URLs get prefixed with DocumentRoot when using mod_rewrite?

If the rule starts with /somedir/... make sure that really no /somedir exists on the filesystem if you don't want to lead the URL to match this directory, i.e., there must be no root directory named somedir on the filesystem. Because if there is such a directory, the URL will not get prefixed with DocumentRoot. This behavior looks ugly, but is really important for some other aspects of URL rewriting.

How can I make all my URLs case-insensitive with mod_rewrite?

You can't! The reasons are: first, that, case translations for arbitrary length URLs cannot be done via regex patterns and corresponding substitutions. One needs a per-character pattern like the sed/Perl tr|..|..| feature. Second, just making URLs always upper or lower case does not solve the whole problem of case-INSENSITIVE URLs, because URLs actually have to be rewritten to the correct case-variant for the file residing on the filesystem in order to allow Apache to access the file. And the Unix filesystem is always case-SENSITIVE.

But there is a module named mod_speling.c in the Apache distribution. Try this module to help correct people who use mis-cased URLs.

Why are RewriteRules in my VirtualHost parts ignored?

Because you have to enable the engine for every virtual host explicitly due to security concerns. Just add a "RewriteEngine on" to your virtual host configuration parts.

How can I use strings with whitespaces in RewriteRule's ENV flag?

There is only one ugly solution: You have to surround the complete flag argument by quotation marks ("[E=...]"). Notice: The argument to quote here is not the argument to the E-flag, it is the argument of the Apache config file parser, i.e., the third argument of the RewriteRule here. So you have to write "[E=any text with whitespaces]".

I. Features

Does or will Apache act as a Proxy server?

mod_proxy provides proxying functionality for a variety of protocols.

What are "multiviews"?

"Multiviews" is the general name given to the Apache server's ability to provide language-specific document variants in response to a request. This is documented quite thoroughly in the content negotiation description page. In addition, Apache Week carried an article on this subject entitled "Content Negotiation Explained".

Why can't I publish to my Apache server using PUT on Netscape Gold and other programs?

Because you need to install and configure a script to handle the uploaded files. This script is often called a "PUT" handler. There are several available, but they may have security problems. Using FTP uploads may be easier and more secure, at least for now. For more information, see the Apache Week article Publishing Pages with PUT.

How can I attach a footer to my documents without using SSI?

You can make arbitrary changes to static documents by configuring an Action which launches a CGI script. The CGI is then responsible for setting a content-type and delivering the requested document (the location of which is passed in the PATH_TRANSLATED environment variable), along with whatever footer is needed.

Busy sites may not want to run a CGI script on every request, and should consider using an Apache module to add the footer. There are several third party modules available through the Apache Module Registry which will add footers to documents. These include mod_trailer, PHP (php3_auto_append_file), mod_layout, and mod_perl (Apache::Sandwich).

Does Apache include a search engine?

Apache does not include a search engine, but there are many good commercial and free search engines which can be used easily with Apache. Some of them are listed on the Web Site Search Tools page. Open source search engines that are often used with Apache include ht://Dig and SWISH-E.

How can I rotate my log files?

The simple answer: by piping the transfer log into an appropriate log file rotation utility.

The longer answer: In the src/support/ directory, you will find a utility called rotatelogs which can be used like this:

TransferLog "|/path/to/rotatelogs /path/to/logs/access_log 86400
to enable daily rotation of the log files. A more sophisticated solution of a logfile rotation utility is available under the name cronolog from Andrew Ford's site at http://www.cronolog.org/. It can automatically create logfile subdirectories based on time and date, and can have a constant symlink point to the rotating logfiles. (As of version 1.6.1, cronolog is available under the Apache License). Use it like this:

CustomLog "|/path/to/cronolog --symlink=/usr/local/apache/logs/access_log /usr/local/apache/logs/%Y/%m/access_log" combined
How do I keep certain requests from appearing in my logs?

The maximum flexibility for removing unwanted information from log files is obtained by post-processing the logs, or using piped-logs to feed the logs through a program which does whatever you want. However, Apache does offer the ability to prevent requests from ever appearing in the log files. You can do this by using the SetEnvIf directive to set an environment variable for certain requests and then using the conditional CustomLog syntax to prevent logging when the environment variable is set.

Does Apache support any sort of database integration?

No. Apache is a Web (HTTP) server, not an application server. The base package does not include any such functionality. See the PHP project and the mod_perl project for examples of modules that allow you to work with databases from within the Apache environment.

Can I use Active Server Pages (ASP) with Apache?

The base Apache Web Server package does not include ASP support. However, a number of projects provide ASP or ASP-like functionality for Apache. Some of these are:

Apache::ASP
mod_mono
See also the related projects page to find out more.

Does Apache come with Java support?

The base Apache Web server package does not include support for Java, Java Server Pages, Enterprise Java Beans, or Java servlets. Those features are available as add-ons from other Apache projects such as Geronimo and Tomcat.

FAQ (last edited 2012-01-17 19:38:24 by TimBannister)
Immutable PageInfo
الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: Background What is Apache?   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:23 am

Background

What is Apache?

The Apache HTTP Server

is a powerful, flexible, HTTP/1.1 compliant web server
implements the latest protocols, including HTTP/1.1 (RFC2616)
is highly configurable and extensible with third-party modules
can be customised by writing 'modules' using the Apache module API
provides full source code and comes with an unrestrictive license
runs on Windows 2000, Netware 5.x and above, OS/2, and most versions of Unix, as well as several other operating systems
is actively being developed
encourages user feedback through new ideas, bug reports and patches
implements many frequently requested features, including:
DBM databases as well, as relational databases and LDAP for authentication
allows you to easily set up password-protected pages with enormous numbers of authorized users, without bogging down the server.
Customized responses to errors and problems
Allows you to set up files, or even CGI scripts, which are returned by the server in response to errors and problems, e.g. setup a script to intercept 500 Server Errors and perform on-the-fly diagnostics for both users and yourself.
Multiple DirectoryIndex directives - Allows you to say DirectoryIndex index.html index.cgi, which instructs the server to either send back index.html or run index.cgi when a directory URL is requested, whichever it finds in the directory.
Unlimited flexible URL rewriting and aliasing - Apache has no fixed limit on the numbers of Aliases and Redirects which may be declared in the config files. In addition, a powerful rewriting engine can be used to solve most URL manipulation problems.
Content negotiation - i.e. the ability to automatically serve clients of varying sophistication and HTML level compliance, with documents which offer the best representation of information that the client is capable of accepting.
Virtual Hosts - Allows the server to distinguish between requests made to different IP addresses or names (mapped to the same machine). Apache also offers dynamically configurable mass-virtual hosting.
Configurable Reliable Piped Logs - You can configure Apache to generate logs in the format that you want. In addition, on most Unix architectures, Apache can send log files to a pipe, allowing for log rotation, hit filtering, real-time splitting of multiple vhosts into separate logs, and asynchronous DNS resolving on the fly.
How and why was Apache HTTP Server created?

The About Apache document explains how the Apache project evolved from its beginnings as an outgrowth of the NCSA httpd project to its current status as one of the fastest, most efficient, and most functional web servers in existence.

Why the name "Apache"?

The name 'Apache' was chosen from respect for the Native American Indian tribe of Apache (Indé), well-known for their superior skills in warfare strategy and their inexhaustible endurance. For more information on the Apache Nation, we suggest searching Google, or AllTheWeb.

Secondarily, and more popularly (though incorrectly) accepted, it's a considered cute name which stuck. Apache is "A PAtCHy server". It was based on some existing code and a series of "patch files".

These days Apache as such means much more. It's first and foremost the Apache Software Foundation, under which there are dozens of projects.

How does Apache httpd performance compare to other servers?

Benchmarks tend to be a measure of configuration competance, rather than of server quality. That is, if you're an expert in IIS, you can probably get it to run faster than you can get Apache to run. You can therefore find comparisions of various HTTP servers that prove that each is faster than all the others. We tend to take server performance benchmarks with a grain of salt.

How thoroughly tested is Apache httpd?

Apache is run on over 120 million Internet servers (as of April 2010) (Source, Netcraft). It has been tested thoroughly by both developers and users. The Apache HTTP Server Project Management Committee maintains rigorous standards before releasing new versions of their server, and our server runs without a hitch on over one half of all WWW servers available on the Internet. When bugs do show up, we release patches and new versions as soon as they are available.

What are the future plans for Apache httpd?

to continue to be an "open source" no-charge-for-use HTTP server,
to keep up with advances in HTTP protocol and web developments in general,
to collect suggestions for fixes/improvements from its users,
to respond to needs of large volume providers as well as occasional users.
Whom do I contact for support?

See http://httpd.apache.org/support.html.

Is there any more information available on Apache httpd?

Indeed there is. See the main Apache web server site. There are also many books about the Apache HTTP Server available.

Where can I get Apache httpd?

You can find out how to download the source for Apache at the main Apache web server site.

Where can I download (certified) 64 bit Apache httpd binaries for Windows?

Right now, there are none. The Apache Software Foundation produces Open Source Software. The 32 bit binaries provided are a courtesy of the community members.

May I use the Apache logo on my product or Web site?

You may NOT use any original artwork from the Apache Software Foundation, nor make or use modified versions of such artwork, except under the conditions in the Apache Trademark Policy document.

B. General Technical Questions

"Why can't I ...? Why won't ... work?" What to do in case of problems

If you are having trouble with your Apache server software, you should take the following steps:

Check the errorlog!
Apache tries to be helpful when it encounters a problem. In many cases, it will provide some details by writing one or messages to the server error log. Sometimes this is enough for you to diagnose & fix the problem yourself (such as file permissions or the like). The default location of the error log is /usr/local/apache/logs/error_log, but see the ErrorLog directive in your config files for the location on your server.
Check the FAQ!
You're already here.
Check the Apache bug database
Most problems that get reported to The Apache Group are recorded in the bug database. Please check the existing reports, open and closed, before adding one. If you find that your issue has already been reported, please don't add a "me, too" report. If the original report isn't closed yet, we suggest that you check it periodically. You might also consider contacting the original submitter, because there may be an email exchange going on about the issue that isn't getting recorded in the database.
Ask in a user support group
A lot of common problems never make it to the bug database because there's already high Q&A traffic about them in the Users mailing list or comp.infosystems.www.servers.unix and related newsgroups. These newsgroups are also available via Google. Many Apache users, and some of the developers, can be found roaming their virtual halls, so it is suggested that you seek wisdom there. The chances are good that you'll get a faster answer there than from the bug database, even if you don't see your question already posted.
If all else fails, report the problem in the bug database
If you've gone through those steps above that are appropriate and have obtained no relief, then please do let The Apache Group know about the problem by logging a bug report.
If your problem involves the server crashing and generating a core dump, please include a backtrace (if possible). As an example,

# cd ServerRoot
# dbx httpd core
(dbx) where
(Substitute the appropriate locations for your ServerRoot and your httpd and core files. You may have to use gdb instead of dbx.)

How do I submit a patch to Apache httpd?

Detailed information for submitting bug reports and patches may be found in the Apache HTTP Server developer documentation.

Why has Apache stolen my favourite site's Internet address?

The simple answer is: "It hasn't." This misconception is usually caused by the site in question having migrated to the Apache Web server software, but not having migrated the site's content yet. When Apache is installed, the default page that gets installed tells the Webmaster the installation was successful. The expectation is that this default page will be replaced with the site's real content. If it doesn't, complain to the Webmaster, not to the Apache project -- we just make the software and aren't responsible for what people do (or don't do) with it.

Why am I getting spam mail from the Apache site?

The short answer is: "You aren't." Usually when someone thinks the Apache site is originating spam, it's because they've traced the spam to a Web site, and the Web site says it's using Apache. See the previous FAQ entry for more details on this phenomenon.

No marketing spam originates from the Apache site. The only mail that comes from the site goes only to addresses that have been requested to receive the mail.

May I include the Apache software on a CD or other package I'm distributing?

The detailed answer to this question can be found in the Apache license, which is included in the Apache distribution in the file LICENSE. You can also find it on the Web at http://www.apache.org/licenses/.

What's the best hardware/operating system/... How do I get the most out of my Apache Web server?

Check out the performance tuning page.

What are "regular expressions"?

Regular expressions are a way of describing a pattern - for example, "all the words that begin with the letter A" or "every 10-digit phone number" or even "Every sentence with two commas in it, and no capital letter Q". Regular expressions (aka "regex"s) are useful in Apache because they let you apply certain attributes against collections of files or resources in very flexible ways - for example, all .gif and .jpg files under any "images" directory could be written as /images/.*(jpg|gif)$. Note that httpd doesn't need the delimiting // so as to avoid "toothpicks" when matching URIs or paths, like: /\/foo\/bar\/?/

The best overview around is probably the one which comes with Perl. Apache's regular expressions use PCRE - Perl Compatible Regular Expressions.

Why isn't there a binary for my platform?

The developers make sure that the software builds and works correctly on the platforms available to them; this does not necessarily mean that your platform is one of them. In addition, the Apache HTTP server project is primarily source oriented, meaning that distributing valid and buildable source code is the purpose of a release, not making sure that there is a binary package for all of the supported platforms.

If you don't see a kit for your platform listed in the binary distribution area (http://httpd.apache.org/dist/httpd/binaries/), it means either that the platform isn't available to any of the developers, or that they just haven't gotten around to preparing a binary for it. As this is a voluntary project, they are under no obligation to do so. Users are encouraged and expected to build the software themselves.

The sole exception to these practices is the Windows package. Unlike most Unix and Unix-like platforms, Windows systems do not come with a bundled software development environment, so we do prepare binary kits for Windows when we make a release. Again, however, it's a voluntary thing and only a limited number of the developers have the capability to build the InstallShield package, so the Windows release may lag somewhat behind the source release. This lag should be no more than a few days at most.

C. Building Apache httpd

Why do I get an error about an undefined reference to "__inet_ntoa" or other __inet_* symbols?

If you have installed BIND-8 then this is normally due to a conflict between your include files and your libraries. BIND-8 installs its include files and libraries /usr/local/include/ and /usr/local/lib/, while the resolver that comes with your system is probably installed in /usr/include/ and /usr/lib/. If your system uses the header files in /usr/local/include/ before those in /usr/include/ but you do not use the new resolver library, then the two versions will conflict.

To resolve this, you can either make sure you use the include files and libraries that came with your system or make sure to use the new include files and libraries. Adding -lbind to the EXTRA_LDFLAGS line in your Configuration file, then re-running Configure, should resolve the problem. (Apache versions 1.2.* and earlier use EXTRA_LFLAGS instead.)

Note:As of BIND 8.1.1, the bind libraries and files are installed under /usr/local/bind by default, so you should not run into this problem. Should you want to use the bind resolvers you'll have to add the following to the respective lines:

EXTRA_CFLAGS=-I/usr/local/bind/include EXTRA_LDFLAGS=-L/usr/local/bind/lib EXTRA_LIBS=-lbind

I get an error about "configure failed for srclib/apr"

This only applies to Apache 2.4 and later

If you are building with the --with-included-apr option, you also need to download the *-deps tarball that matches the main release that you are trying to build, and extract it into the same directory.

Why won't Apache compile with my system's cc?

If the server won't compile on your system, it is probably due to one of the following causes:

The Configure script doesn't recognize your system environment.
This might be either because it's completely unknown or because the specific environment (include files, OS version, et cetera) isn't explicitly handled. If this happens, you may need to port the server to your OS yourself.
Your system's C compiler is garbage.
Some operating systems include a default C compiler that is either not ANSI C-compliant or suffers from other deficiencies. The usual recommendation in cases like this is to acquire, install, and use gcc.
Your include files may be confused.
In some cases, we have found that a compiler installation or system upgrade has left the C header files in an inconsistent state. Make sure that your include directory tree is in sync with the compiler and the operating system.
Your operating system or compiler may be out of revision.
Software vendors (including those that develop operating systems) issue new releases for a reason; sometimes to add functionality, but more often to fix bugs that have been discovered. Try upgrading your compiler and/or your operating system.
The Apache Group tests the ability to build the server on many different platforms. Unfortunately, we can't test all of the OS platforms there are. If you have verified that none of the above issues is the cause of your problem, and it hasn't been reported before, please submit a problem report. Be sure to include complete details, such as the compiler & OS versions and exact error messages.

Why do I get complaints about redefinition of "struct iovec" when compiling under Linux?

This is a conflict between your C library includes and your kernel includes. You need to make sure that the versions of both are matched properly. There are two workarounds, either one will solve the problem:

Remove the definition of struct iovec from your C library includes. It is located in /usr/include/sys/uio.h. Or, Add -DNO_WRITEV to the EXTRA_CFLAGS line in your Configuration and reconfigure/rebuild. This hurts performance and should only be used as a last resort.

I'm using gcc and I get some compilation errors, what is wrong?

GCC parses your system header files and produces a modified subset which it uses for compiling. This behavior ties GCC tightly to the version of your operating system. So, for example, if you were running IRIX 5.3 when you built GCC and then upgrade to IRIX 6.2 later, you will have to rebuild GCC. Similarly for Solaris 2.4, 2.5, or 2.5.1 when you upgrade to 2.6. Sometimes you can type "gcc -v" and it will tell you the version of the operating system it was built against.

If you fail to do this, then it is very likely that Apache will fail to build. One of the most common errors is with readv, writev, or uio.h. This is not a bug with Apache. You will need to re-install GCC.

D. Error Log Messages and Problems Starting Apache

Why do I get "setgid: Invalid argument" at startup?

Your Group directive (probably in conf/httpd.conf) needs to name a group that actually exists in the /etc/group file (or your system's equivalent). This problem is also frequently seen when a negative number is used in the Group directive (e.g., "Group #-1"). Using a group name -- not group number -- found in your system's group database should solve this problem in all cases.

Why am I getting "httpd: could not set socket option TCP_NODELAY" in my error log?

This message almost always indicates that the client disconnected before Apache reached the point of calling setsockopt() for the connection. It shouldn't occur for more than about 1% of the requests your server handles, and it's advisory only in any case.

Why am I getting "connection reset by peer" in my error log?

This is a normal message and nothing about which to be alarmed. It simply means that the client canceled the connection before it had been completely set up - such as by the end-user pressing the "Stop" button. People's patience being what it is, sites with response-time problems or slow network links may experience this more than high capacity ones or those with large pipes to the network.

The errorlog says Apache dumped core, but where's the dump file?

The error log message about dumped core includes the directory where the dump file should be located. However, many Unixes do not allow a process that has called setuid() to dump core for security reasons ('Is this still a problem?'); the typical Apache setup has the server started as root to bind to port 80, after which it uses setuid() to change UIDs to a non-privileged user to serve requests.

Dealing with this is extremely operating system-specific, and may require rebuilding your system kernel. Consult your operating system documentation or vendor for more information about whether your system does this and how to bypass it. If there is a documented way of bypassing it, it is recommended that you bypass it only for the httpd server process if possible.

The canonical location for Apache's core-dump files is the ServerRoot directory. The location can be set via the CoreDumpDirectory directive to a different directory. Make sure that this directory is writable by the user the server runs as (as opposed to the user the server is started as).

When I run it under Linux I get "shmget: function not found", what should I do?

Your kernel has been built without SysV IPC support. You will have to rebuild the kernel with that support enabled (it's under the "General Setup" submenu). Documentation for kernel building is beyond the scope of this FAQ; you should consult the Kernel HOWTO, or the documentation provided with your distribution, or a Linux newsgroup/mailing list. As a last-resort workaround, you can comment out the #define USE_SHMGET_SCOREBOARD definition in the LINUX section of src/conf.h and rebuild the server (prior to 1.3b4, simply removing #define HAVE_SHMGET would have sufficed). This will produce a server which is slower and less reliable.

Server hangs, or fails to start, and/or error log fills with "fcntl: F_SETLKW: No record locks available" or similar messages

These are symptoms of a file locking problem, which usually means that the server is trying to use a synchronization file on an NFS filesystem.

Because of its parallel-operation model, the Apache Web server needs to provide some form of synchronization when accessing certain resources. One of these synchronization methods involves taking out locks on a file, which means that the filesystem whereon the lockfile resides must support locking. In many cases this means it can't be kept on an NFS-mounted filesystem.

To cause the Web server to work around the NFS locking limitations, include a line such as the following in your server configuration files:


LockFile /var/run/apache-lock
The directory should not be generally writable (e.g., don't use /var/tmp). See the LockFile documentation for more information.

When I try to start Apache from a DOS window, I get a message like "Cannot determine host name. Use ServerName directive to set it manually." What does this mean?

It means what it says; the Apache software can't determine the hostname of your system. Edit your conf\httpd.conf file, look for the string "ServerName", and make sure there's an uncommented directive such as

ServerName localhost or

ServerName www.foo.com in the file. Correct it if there one there with wrong information, or add one if you don't already have one.

Also, make sure that your Windows system has DNS enabled. See the TCP/IP setup component of the Networking or Internet Options control panel.

After verifying that DNS is enabled and that you have a valid hostname in your ServerName directive, try to start the server again.

When I try to start Apache on Windows, I get a message like "System error 1067 has occurred. The process terminated unexpectedly." What does this mean?

This message means that the Web server was unable to start correctly for one reason or another. To find out why, execute the following commands in a DOS window:

c: cd "\Program Files\Apache Group\Apache" apache
(If you don't get the prompt back, hit Control-C to cause Apache to exit.)

The error you see will probably be one of those preceding this question in the FAQ.

First check the Windows NT Event Log for Application errors using the Windows NT/2000 Event Viewer program. Any errors that occur prior to opening the Apache error log will be stored here, if Apache is run as a Service on NT or 2000. As with any error, also check your Apache error log.

On a SuSE Linux system, I try and configure access control using basic authentication. Although I follow the example exactly, authentication fails, and an error message "admin: not a valid FDN: ...." is logged.

In the SuSE distribution, additional 3rd party authentication modules have been added and activated by default. These modules interfere with the Apache standard modules and cause Basic authentication to fail. Our recommendation is to comment all those modules in /etc/httpd/suse_addmodule.conf and /etc/httpd/suse_loadmodule.conf which are not actually required for running your server.

Why am I getting server restart messages periodically, when I did not restart the server?

Problem: You are noticing restart messages in your error log, periodically, when you know you did not restart the server yourself:


[Thu Jun 6 04:02:01 2002] [notice] SIGHUP received. Attempting to restart
[Thu Jun 6 04:02:02 2002] [notice] Apache configured -- resuming normal operations
Check your cron jobs to see when/if your server logs are being rotated. Compare the time of rotation to the error message time. If they are the same, you can somewhat safely assume that the restart is due to your server logs being rotated.

Why am I getting "module module-name is not compatible with this version of Apache" messages in my error log?

Module Magic Number (MMN) is a constant defined in Apache source that is associated with binary compatibility of modules. It is changed when internal Apache structures, function calls and other significant parts of API change in such a way that binary compatibility cannot be guaranteed any more. On MMN change, all third party modules have to be at least recompiled, sometimes even slightly changed in order to work with the new version of Apache.

If you're getting the above error messages, contact the vendor of the module for the new binary, or compile it if you have access to the source code.

E. Configuration Questions

Why can't I run more than <n> virtual hosts?

You are probably running into resource limitations in your operating system. The most common limitation is the per-process limit on file descriptors, which is almost always the cause of problems seen when adding virtual hosts. Apache often does not give an intuitive error message because it is normally some library routine (such as gethostbyname()) which needs file descriptors and doesn't complain intelligibly when it can't get them.

Each log file requires a file descriptor, which means that if you are using separate access and error logs for each virtual host, each virtual host needs two file descriptors. Each Listen directive also needs a file descriptor.

Typical values for <n> that we've seen are in the neighborhood of 1024 or 2048. When the server bumps into the file descriptor limit, it may dump core with a SIGSEGV, it might just hang, or it may limp along and you'll see (possibly meaningful) errors in the error log. One common problem that occurs when you run into a file descriptor limit is that CGI scripts stop being executed properly.

As to what you can do about this:

Reduce the number of Listen directives
If there are no other servers running on the machine on the same port then you normally don't need any Listen directives at all. By default Apache listens to all addresses on port 80.
Reduce the number of log files
You can use mod_log_config to log all requests to a single log file while including the name of the virtual host in the log file. You can then write a script to split the logfile into separate files later if necessary. Such a script is provided with the Apache distribution in the src/support/split-logfile file.
Increase the number of file descriptors available to the server
(see your system's documentation on the limit or ulimit commands). For some systems, information on how to do this is available in the performance hints page. There is a specific note for FreeBSD below.
"Don't do that" - try to run with fewer virtual hosts
Spread your operation across multiple server processes (using Listen for example, but see the first point) and/or ports. Since this is an operating-system limitation, there's not much else available in the way of solutions.

Why doesn't my ErrorDocument 401 work?

You need to use it with a URL in the form "/foo/bar" and not one with a method and hostname such as "http://host/foo/bar". See the ErrorDocument documentation for details. This was incorrectly documented in the past.

Why does Apache send a cookie on every response?

Apache does not automatically send a cookie on every response, unless you have re-compiled it with the mod_usertrack module, and specifically enabled it with the CookieTracking directive. This module may help track users, and uses cookies to do this. If you are not using the data generated by mod_usertrack, do not compile it into Apache.

Why don't my cookies work?

Apache httpd passes on your Set-Cookie header, like any other header. If cookies do not work it will be because your script does not work properly or your browser does not use cookies or is not set-up to accept them.

How do I add browsers and referrers to my logs?

Apache provides a couple of different ways of doing this. The recommended method is to compile the mod_log_config module into your configuration and use the CustomLog directive.

You can either log the additional information in files other than your normal transfer log, or you can add them to the records already being written. For example:

CustomLog logs/access_log "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""

This will add the values of the User-agent: and Referer: headers, which indicate the client and the referring page, respectively, to the end of each line in the access log.

You may want to check out the Apache Week article entitled: "Gathering Visitor Information: Customizing Your Logfiles".

Why does accessing directories only work when I include the trailing "/" (e.g., http://foo.domain.com/~user/) but not when I omit it (e.g., http://foo.domain.com/~user)?

When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.

Add a ServerName directive to the config file to tell it what the domain name of the server is.

The other thing that can occasionally cause this symptom is a misunderstanding of the Alias directive, resulting in an alias working with a trailing slash, and not without one. The Alias directive is very literal, and aliases what you tell it to. Consider the following example:

Alias /example/ /home/www/example/
The above directive creates an alias for URLs starting with /example/, but does not alias URLs starting with /example. That is to say, a URL such as http://servername.com/example/ will get the desired content, but a URL such as http://servername.com/example will result in a "file not found" error.

The following Alias, on the other hand, will work for both cases:

Alias /example /home/www/example
Why doesn't mod_info list any directives?

The mod_info module allows you to use a Web browser to see how your server is configured. Among the information it displays is the list of modules and their configuration directives. The "current" values for the directives are not necessarily those of the running server; they are extracted from the configuration files themselves at the time of the request. If the files have been changed since the server was last reloaded, the display will not match the values actively in use. If the files and the path to the files are not readable by the user as which the server is running (see the User directive), then mod_info cannot read them in order to list their values. An entry will be made in the error log in this event, however.

My .htaccess files are being ignored.

This is almost always due to your AllowOverride directive being set incorrectly for the directory in question. If it is set to None then .htaccess files will not even be looked for. That is a good thing. If you have access to edit the httpd.conf, you should not use .htaccess files, ever. If your customers do need support for .htaccess, make sure that AllowOverride is set to something sensible (i.e.: Not All). Be certain it covers the directory you are trying to use the .htaccess file in. This is normally accomplished by ensuring it is inside the proper Directory container.

You can tell if this is your problem by adding nonsense text to your .htaccess file and reloading the page. If you do not get a server error, then Apache httpd is not reading your .htaccess file.

Why do I get a "Forbidden" message whenever I try to access a particular directory?

This message is generally caused because either

The underlying file system permissions do not allow the User/Group under which Apache is running to access the necessary files; or
The Apache configuration has some access restrictions in place which forbid access to the files.
You can determine which case applies to your situation by checking the error log.

In the case where file system permission are at fault, see (13) Permission Denied for more info.

Why do my files appear correctly in Internet Explorer, but show up as source or trigger a save window with Netscape; or, Why doesn't Internet Explorer render my text/plain document correctly?

MS Internet Explorer (MSIE) and Netscape handle mime type detection in different ways, and therefore will display the document differently. In particular, IE sometimes relies on the file extension or the contents of the file to determine the mime type. This can happen when the server specifies a mime type of application/octet-stream or text/plain. This behavior violates the the HTTP standard and makes it impossible to deliver plain text documents to MSIE clients in some cases. More details are available on MSIE's mime type detection behavior in an MSDN article and a note by Alan J. Flavell.
الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: رد: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:24 am


The best you can do as a server administrator is to accurately configure the mime type of your documents by editing the mime.types file or using an AddType directive in the Apache configuration files. In some cases, you may be able to fool MSIE into rendering text/plain documents correctly by assuring they have a .txt filename extension, but this will not work if MSIE thinks the content looks like another file type.

My site is accessible under many different hostnames; how do I redirect clients so that they see only a single name?

Many sites map a variety of hostnames to the same content. For example, www.example.com, example.com and www.example.net may all refer to the same site. It is best to make sure that, regardless of the name clients use to access the site, they will be redirected to a single, canonical hostname. This makes the site easier to maintain and assures that there will be only one version of the site in proxy caches and search engines.

There are two techniques to implement canonical hostnames:

Use mod_rewrite as described in the "Canonical Hostnames" section of the URL Rewriting Guide.

See http://httpd.apache.org/docs/current/rewrite/rewrite_guide.html#canonicalurl.

Use name-based virtual hosting:

NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.example.net
ServerAlias example.com
Redirect permanent / http://www.example.com/
</VirtualHost>

<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>
Why can I access my website from the server or from my local network, but I can't access it from elsewhere on the Internet?

There are many possible reasons for this, and almost all of them are related to the configuration of your network, not the configuration of the Apache HTTP Server. One of the most common problems is that a firewall blocks access to the default HTTP port 80. In particular, many consumer ISPs block access to this port. You can see if this is the case by changing any Port and Listen directives in httpd.conf to use port 8000 and then request your site using http://yourhost.example.com:8000/. (Of course, a very restrictive firewall may block this port as well.)

How do I turn automatic directory listings on or off?

If a client requests a URL that designates a directory and the directory does not contain a filename that matches the DirectoryIndex directive, then mod_autoindex can be configured to present a listing of the directory contents.

To turn on automatic directory indexing, find the Options directive that applies to the directory and add the Indexes keyword. For example:

<Directory /path/to/directory>
Options +Indexes
</Directory>
To turn off automatic directory indexing, remove the Indexes keyword from the appropriate Options line. To turn off directory listing for a particular subdirectory, you can use Options -Indexes. For example:

<Directory /path/to/directory>
Options -Indexes
</Directory>
Why do my Options directives not have the desired effect?

Directives placed in the configuration files are applied in a very particular order, as described by How Directory, Location, and Files sections work. In addition, each Options directive has the effect of resetting the options to none before adding the specified options (unless only "+" and "-" options are used). The consequence is that Options set in the main server or virtual host context (outside any directory, location, or files section) will usually have no effect, because they are overridden by more specific Options directives. For example, in the following


<Directory /usr/local/apache/htdocs>
Options Indexes
</Directory>
Options Includes ExecCGI
Includes and ExecCGI will be off in the /usr/local/apache/htdocs directory.

You can usually avoid problems by either finding the Options directive that already applies to a specific directory and changing it, or by putting your Options directive inside the most specific possible <Directory> section.

How can I change the information that Apache returns about itself in the headers?

When a client connects to Apache, part of the information returned in the headers is the name "Apache" Additional information that can be sent is the version number, such as "2.2.17", the operating system, and a list of non-standard modules you have installed.

For example:

Server: Apache/2.2.17 (Unix) mod_perl/1.26 Frequently, people want to remove this information, under the mistaken understanding that this will make the system more secure. This is probably not the case, as the same exploits will likely be attempted regardless of the header information you provide.

There are, however, two answers to this question: the correct answer, and the answer that you are probably looking for.

The correct answer to this question is that you should use the ServerTokens directive to alter the quantity of information which is passed in the headers. Setting this directive to Prod will pass the least possible amount of information:

Server: Apache The answer you are probably looking for is how to make Apache lie about what what it is, ie send something like:

Server: Bob's Happy HTTPd Server In order to do this, you will need to modify the Apache source code and rebuild Apache. This is not advised, as it is almost certain not to provide you with the added security you think that you are gaining. The exact method of doing this is left as an exercise for the reader, as we are not keen on helping you do something that is intrinsically a bad idea.

Why do I see requests for other sites appearing in my log files?

An access_log entry showing this situation could look like this:

63.251.56.142 - - [25/Jul/2002:12:48:04 -0700] "GET http://www.yahoo.com/ HTTP/1.0" 200 1456 The question is: why did a request for www.yahoo.com come to your server instead of Yahoo's server? And why does the response have a status code of 200 (success)?

This is usually the result of malicious clients trying to exploit open proxy servers to access a website without revealing their true location. If you find entries like this in your log, the first thing to do is to make sure you have properly configured your server not to proxy for unknown clients. If you don't need to provide a proxy server at all, you should simply assure that the ProxyRequests directive is not set on. If you do need to run a proxy server, then you must ensure that you secure your server properly so that only authorized clients can use it.

If your server is configured properly, then the attempt to proxy through your server will fail. If you see a status code of 404 (file not found) in the log, then you know that the request failed. If you see a status code of 200 (success), that does not necessarily mean that the attempt to proxy succeeded. RFC2616 section 5.1.2 mandates that Apache must accept requests with absolute URLs in the request-URI, even for non-proxy requests. Since Apache has no way to know all the different names that your server may be known under, it cannot simply reject hostnames it does not recognize. Instead, it will serve requests for unknown sites locally by stripping off the hostname and using the default server or virtual host. Therefore you can compare the size of the file (1456 in the above example) to the size of the corresponding file in your default server. If they are the same, then the proxy attempt failed, since a document from your server was delivered, not a document from www.yahoo.com.

If you wish to prevent this type of request entirely, then you need to let Apache know what hostnames to accept and what hostnames to reject. You do this by configuring name-virtual hosts, where the first listed host is the default host that will catch and reject unknown hostnames. For example:


NameVirtualHost *:80

<VirtualHost *:80>
ServerName default.only
<Location />
Order allow,deny
Deny from all
</Location>
</VirtualHost>

<VirtualHost *:80>
ServerName realhost1.example.com
ServerAlias alias1.example.com alias2.example.com
DocumentRoot /path/to/site1
</VirtualHost>
...
F. Dynamic Content (CGI and SSI)

How do I enable CGI execution in directories other than the ScriptAlias?

Apache recognizes all files in a directory named as a ScriptAlias as being eligible for execution rather than processing as normal documents. This applies regardless of the file name, so scripts in a ScriptAlias directory don't need to be named "*.cgi" or "*.pl" or whatever. In other words, all files in a ScriptAlias directory are scripts, as far as Apache is concerned.

To persuade Apache to execute scripts in other locations, such as in directories where normal documents may also live, you must tell it how to recognize them - and also that it's okay to execute them. For this, you need to use something like the AddHandler directive.

In an appropriate section of your server configuration files, add a line such as AddHandler cgi-script .cgi The server will then recognize that all files in that location (and its logical descendants) that end in ".cgi" are script files, not documents.

Make sure that the directory location is covered by an Options declaration that includes the ExecCGI option. In some situations, you might not want to actually allow all files named "*.cgi" to be executable. Perhaps all you want is to enable a particular file in a normal directory to be executable. This can be alternatively accomplished via mod_rewrite and the following steps:

Locally add to the corresponding .htaccess file a ruleset similar to this one:

RewriteEngine on
RewriteBase /~foo/bar/
RewriteRule ^quux\.cgi$ - [T=application/x-httpd-cgi]
Make sure that the directory location is covered by an Options declaration that includes the ExecCGI and FollowSymLinks option.

What does it mean when my CGIs fail with "Premature end of script headers"?

It means just what it says: the server was expecting a complete set of HTTP headers (one or more followed by a blank line), and didn't get them.

The most common cause of this problem is the script dying before sending the complete set of headers, or possibly any at all, to the server. To see if this is the case, try running the script standalone from an interactive session, rather than as a script under the server. If you get error messages, this is almost certainly the cause of the "premature end of script headers" message. Even if the CGI runs fine from the command line, remember that the environment and permissions may be different when running under the web server. The CGI can only access resources allowed for the User and Group specified in your Apache configuration. In addition, the environment will not be the same as the one provided on the command line, but it can be adjusted using the directives provided by mod_env.

The second most common cause of this (aside from people not outputting the required headers at all) is a result of an interaction with Perl's output buffering. To make Perl flush its buffers after each output statement, insert the following statements around the print or write statements that send your HTTP headers:


{
my $current_file_handle = select (STDOUT);
local $| = 1;
#
# print your HTTP headers here
#
select ($current_file_handle);
}
This is generally only necessary when you are calling external programs from your script that send output to stdout, or if there will be a long delay between the time the headers are sent and the actual content starts being emitted. To maximize performance, you should turn buffer-flushing back off (with $| = 0 or the equivalent) after the statements that send the headers, as displayed above.

If your script isn't written in Perl, do the equivalent thing for whatever language you are using (e.g., for C, call fflush() after writing the headers).

Another cause for the "premature end of script headers" message are the RLimitCPU and RLimitMEM directives. You may get the message if the CGI script was killed due to a resource limit.

In addition, a configuration problem in suEXEC, mod_perl, or another third party module can often interfere with the execution of your CGI and cause the "premature end of script headers" message.

Why do I keep getting "Method Not Allowed" for form POST requests?

This is almost always due to Apache not being configured to treat the file you are trying to POST to as a CGI script. You can not POST to a normal HTML file; the operation has no meaning. See the FAQ entry on CGIs outside ScriptAliased directories for details on how to configure Apache to treat the file in question as a CGI.

How do I enable SSI (parsed HTML)?

SSI (an acronym for Server-Side Include) directives allow static HTML documents to be enhanced at run-time (e.g., when delivered to a client by Apache). The format of SSI directives is covered in the mod_include manual; suffice it to say that Apache supports not only SSI but xSSI (eXtended SSI) directives.

Processing a document at run-time is called parsing it; hence the term "parsed HTML" sometimes used for documents that contain SSI instructions. Parsing tends to be resource-consumptive compared to serving static files, and is not enabled by default. It can also interfere with the cachability of your documents, which can put a further load on your server. (See the next question for more information about this.)

To enable SSI processing, you need to

Build your server with the mod_include module. This is normally compiled in by default.
Make sure your server configuration files have an Options directive which permits Includes.
Make sure that the directory where you want the SSI documents to live is covered by the "INCLUDEES" content filter, either explicitly or in some ancestral location. That can be done with the following directives:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
This indicates that all files ending in ".shtml" in that location (or its descendants) should be parsed. Note that using ".html" will cause all normal HTML files to be parsed, which may put an inordinate load on your server.

For additional information, see the mod_include documentation.

Why don't my parsed files get cached?

Since the server is performing run-time processing of your SSI directives, which may change the content shipped to the client, it can't know at the time it starts parsing what the final size of the result will be, or whether the parsed result will always be the same. This means that it can't generate Content-Length or Last-Modified headers. Caches commonly work by comparing the Last-Modified of what's in the cache with that being delivered by the server. Since the server isn't sending that header for a parsed document, whatever's doing the caching can't tell whether the document has changed or not - and so fetches it again to be on the safe side.

You can work around this in some cases by causing an Expires header to be generated. (See the mod_expires documentation for more details.) Another possibility is to use the XBitHack Full mechanism, which tells Apache to send (under certain circumstances detailed in the XBitHack directive description) a Last-Modified header based upon the last modification time of the file being parsed. Note that this may actually be lying to the client if the parsed file doesn't change but the SSI-inserted content does; if the included content changes often, this can result in stale copies being cached.

How can I have my script output parsed?

So you want to include SSI directives in the output from your CGI script, but can't figure out how to do it? The short answer is "you can't." This is potentially a security liability and, more importantly, it can not be cleanly implemented under the current server API. The best workaround is for your script itself to do what the SSIs would be doing. After all, it's generating the rest of the content.

SSIs don't work for VirtualHosts and/or user home directories.

This is almost always due to having some setting in your config file that sets "Options Includes" or some other setting for your DocumentRoot but not for other directories. If you set it inside a Directory section, then that setting will only apply to that directory.

Why is the environment variable REMOTE_USER not set?

This variable is set and thus available in SSI or CGI scripts if and only if the requested document was protected by access authentication. For an explanation on how to implement these restrictions, see Apache Week's articles on Using User Authentication or DBM User Authentication.

Hint: When using a CGI script to receive the data of a HTML FORM, notice that protecting the document containing the FORM is not sufficient to provide REMOTE_USER to the CGI script. You have to protect the CGI script, too. Or alternatively only the CGI script (then authentication happens only after filling out the form).

How do I allow each of my user directories to have a cgi-bin directory?

Remember that CGI execution does not need to be restricted only to cgi-bin directories. You can allow CGI script execution in arbitrary parts of your filesystem.

There are many ways to give each user directory a cgi-bin directory such that anything requested as http://example.com/~user/cgi-bin/program will be executed as a CGI script. Two alternatives are:

Place the cgi-bin directory next to the public_html directory:

ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
Place the cgi-bin directory underneath the public_html directory:
<Directory /home/*/public_html/cgi-bin>
Options ExecCGI
SetHandler cgi-script
</Directory>
If you are using suexec, the first technique will not work because CGI scripts must be stored under the public_html directory.

G. Authentication and Access Restrictions

Why isn't restricting access by host or domain name working correctly?

Two of the most common causes of this are:

An error, inconsistency, or unexpected mapping in the DNS registration
This happens frequently: your configuration restricts access to Host.FooBar.Com, but you can't get in from that host. The usual reason for this is that Host.FooBar.Com is actually an alias for another name, and when Apache performs the address-to-name lookup it's getting the real name, not Host.FooBar.Com. You can verify this by checking the reverse lookup yourself. The easiest way to work around it is to specify the correct host name in your configuration.

Inadequate checking and verification in your configuration of Apache
If you intend to perform access checking and restriction based upon the client's host or domain name, you really need to configure Apache to double-check the origin information it's supplied. You do this by adding this to your configuration:

HostnameLookups Double
This will cause Apache to be very paranoid about making sure a particular host address is really assigned to the name it claims to be. Note that this can incur a significant performance penalty, however, because of all the name resolution requests being sent to a nameserver.

How do I set up Apache to require a username and password to access certain documents?

There are several ways to do this; some of the more popular ones are to use the mod_authn_file, mod_authn_dbd, or mod_authnz_ldap modules.

For an explanation on how to implement these restrictions, see the authentication tutorial in the Apache HTTP Server documentation.

How do I set up Apache to allow access to certain documents only if a site is either a local site or the user supplies a password and username?

Use the Satisfy directive, in particular the Satisfy Any directive, to require that only one of the access restrictions be met. For example, adding the following configuration to a .htaccess or server configuration file would restrict access to people who either are accessing the site from a host under domain.com or who can supply a valid username and password:


Deny from all
Allow from .domain.com
AuthType Basic
AuthUserFile /usr/local/apache/conf/htpasswd.users
AuthName "special directory"
Require valid-user
Satisfy any
See the user authentication question and the mod_authnz_host module for details on how the above directives work.

Why does my authentication give me a server error?

Under normal circumstances, the Apache access control modules will pass unrecognized user IDs on to the next access control module in line. Only if the user ID is recognized and the password is validated (or not) will it give the usual success or "authentication failed" messages.

However, if the last access module in line 'declines' the validation request (because it has never heard of the user ID or because it is not configured), the http_request handler will give one of the following, confusing, errors:

check access
check user. No user file?
check access. No groups file?
This does not mean that you have to add an 'AuthUserFile /dev/null' line as some magazines suggest!

The solution is to ensure that at least the last module is authoritative and CONFIGURED. By default, mod_auth is authoritative and will give an OK/Denied, but only if it is configured with the proper AuthUserFile. Likewise, if a valid group is required. (Remember that the modules are processed in the reverse order from that in which they appear in your compile-time Configuration file.)

A typical situation for this error is when you are using the mod_auth_dbm, mod_auth_msql, mod_auth_mysql, mod_auth_anon or mod_auth_cookie modules on their own. These are by default not authoritative, and this will pass the buck on to the (non-existent) next authentication module when the user ID is not in their respective database. Just add the appropriate 'XXXAuthoritative yes' line to the configuration.

In general it is a good idea (though not terribly efficient) to have the file-based mod_auth a module of last resort. This allows you to access the web server with a few special passwords even if the databases are down or corrupted. This does cost a file open/seek/close for each request in a protected area.

Do I have to keep the (SQL) authentication information on the same machine?

Some organizations feel very strongly about keeping the authentication information on a different machine than the webserver. With the mod_auth_msql, mod_auth_mysql, and other SQL modules connecting to (R)DBMses this is quite possible. Just configure an explicit host to contact.

Be aware that with mSQL and Oracle, opening and closing these database connections is very expensive and time consuming. You might want to look at the code in the auth_* modules and play with the compile time flags to alleviate this somewhat, if your RDBMS licences allow for it.

Can I use my /etc/passwd file for Web page authentication?

Yes, you can - but it's a very bad idea. Here are some of the reasons:

The Web technology provides no governors on how often or how rapidly password (authentication failure) retries can be made. That means that someone can hammer away at your system's root password using the Web, using a dictionary or similar mass attack, just as fast as the wire and your server can handle the requests. Most operating systems these days include attack detection (such as n failed passwords for the same account within m seconds) and evasion (breaking the connection, disabling the account under attack, disabling all logins from that source, et cetera), but the Web does not.
An account under attack isn't notified (unless the server is heavily modified); there's no "You have 19483 login failures" message when the legitimate owner logs in.
Without an exhaustive and error-prone examination of the server logs, you can't tell whether an account has been compromised. Detecting that an attack has occurred, or is in progress, is fairly obvious, though - if you look at the logs.
Web authentication passwords (at least for Basic authentication) generally fly across the wire, and through intermediate proxy systems, in what amounts to plain text. "O'er the net we go/Caching all the way;/O what fun it is to surf/Giving my password away!"
Since HTTP is stateless, information about the authentication is transmitted each and every time a request is made to the server. Essentially, the client caches it after the first successful access, and transmits it without asking for all subsequent requests to the same server.
It's relatively trivial for someone on your system to put up a page that will steal the cached password from a client's cache without them knowing. Can you say "password grabber"?
If you still want to do this in light of the above disadvantages, the method is left as an exercise for the reader. It'll void your Apache warranty, though, and you'll lose all accumulated UNIX guru points.

Why does Apache ask for my password twice before serving a file?

If the hostname under which you are accessing the server is different than the hostname specified in the ServerName directive, then depending on the setting of the UseCanonicalName directive, Apache will redirect you to a new hostname when constructing self-referential URLs. This happens, for example, in the case where you request a directory without including the trailing slash.

When this happens, Apache will ask for authentication once under the original hostname, perform the redirect, and then ask again under the new hostname. For security reasons, the browser must prompt again for the password when the host name changes.

To eliminate this problem you should

Always use the trailing slash when requesting directories;
Change the ServerName to match the name you are using in the URL;
and/or Set UseCanonicalName off.
How can I prevent people from "stealing" the images from my web site?

The goal here is to prevent people from inlining your images directly from their web site, but accessing them only if they appear inline in your pages.

This can be accomplished with a combination of SetEnvIf and the Deny and Allow directives. However, it is important to understand that any access restriction based on the REFERER header is intrinsically problematic due to the fact that browsers can send an incorrect REFERER, either because they want to circumvent your restriction or simply because they don't send the right thing (or anything at all).

The following configuration will produce the desired effect if the browser passes correct REFERER headers.


SetEnvIf REFERER "www\.mydomain\.com" linked_from_here
SetEnvIf REFERER "^$" linked_from_here

<Directory /www/images>
Order deny,allow
Deny from all
Allow from env=linked_from_here
</Directory>
Further examples can be found in the Environment Variables documentation.

H. URL Rewriting

Where can I find mod_rewrite rulesets which already solve particular URL-related problems?

There is a collection of practical solutions that can be found in the URL Rewriting Guide. If you have more interesting rulesets which solve particular problems not currently covered in this document, open a doc suggestion in bugzilla to add it. The other webmasters will thank you for avoiding the reinvention of the wheel.

Where can I find any published information about URL-manipulations and mod_rewrite?

There is an article from Ralf S. Engelschall about URL-manipulations based on mod_rewrite in the "iX Multiuser Multitasking Magazin" issue #12/96. The German (original) version can be read online at <http://www.heise.de/ix/artikel/1996/12/149/>, the English (translated) version can be found at <http://www.heise.de/ix/artikel/E/1996/12/149/>.

Why is mod_rewrite so difficult to learn and seems so complicated?

Hmmm... there are a lot of reasons. First, mod_rewrite itself is a powerful module which can help you in really all aspects of URL rewriting, so it can be no trivial module per definition. To accomplish its hard job it uses software leverage and makes use of a powerful regular expression library by Henry Spencer. And regular expressions itself can be difficult to newbies, while providing the most flexible power to the advanced hacker.

On the other hand mod_rewrite has to work inside the Apache API environment and needs to do some tricks to fit there. For instance the Apache API really was not designed for URL rewriting at the .htaccess level of processing. Or the problem of multiple rewrites in sequence, which is also not handled by the API per design. To provide this features mod_rewrite has to do some special (but API compliant!) handling which leads to difficult processing inside the Apache kernel. While the user usually doesn't see anything of this processing, it can be difficult to find problems when some of your RewriteRules seem not to work.

What can I do if my RewriteRules don't work as expected?

Use "RewriteLog somefile" and "RewriteLogLevel 9" and have a precise look at the steps the rewriting engine performs. This is really the only one and best way to debug your rewriting configuration.

Why don't some of my URLs get prefixed with DocumentRoot when using mod_rewrite?

If the rule starts with /somedir/... make sure that really no /somedir exists on the filesystem if you don't want to lead the URL to match this directory, i.e., there must be no root directory named somedir on the filesystem. Because if there is such a directory, the URL will not get prefixed with DocumentRoot. This behavior looks ugly, but is really important for some other aspects of URL rewriting.

How can I make all my URLs case-insensitive with mod_rewrite?

You can't! The reasons are: first, that, case translations for arbitrary length URLs cannot be done via regex patterns and corresponding substitutions. One needs a per-character pattern like the sed/Perl tr|..|..| feature. Second, just making URLs always upper or lower case does not solve the whole problem of case-INSENSITIVE URLs, because URLs actually have to be rewritten to the correct case-variant for the file residing on the filesystem in order to allow Apache to access the file. And the Unix filesystem is always case-SENSITIVE.

But there is a module named mod_speling.c in the Apache distribution. Try this module to help correct people who use mis-cased URLs.

Why are RewriteRules in my VirtualHost parts ignored?

Because you have to enable the engine for every virtual host explicitly due to security concerns. Just add a "RewriteEngine on" to your virtual host configuration parts.

How can I use strings with whitespaces in RewriteRule's ENV flag?

There is only one ugly solution: You have to surround the complete flag argument by quotation marks ("[E=...]"). Notice: The argument to quote here is not the argument to the E-flag, it is the argument of the Apache config file parser, i.e., the third argument of the RewriteRule here. So you have to write "[E=any text with whitespaces]".

I. Features

Does or will Apache act as a Proxy server?

mod_proxy provides proxying functionality for a variety of protocols.

What are "multiviews"?

"Multiviews" is the general name given to the Apache server's ability to provide language-specific document variants in response to a request. This is documented quite thoroughly in the content negotiation description page. In addition, Apache Week carried an article on this subject entitled "Content Negotiation Explained".

Why can't I publish to my Apache server using PUT on Netscape Gold and other programs?

Because you need to install and configure a script to handle the uploaded files. This script is often called a "PUT" handler. There are several available, but they may have security problems. Using FTP uploads may be easier and more secure, at least for now. For more information, see the Apache Week article Publishing Pages with PUT.

How can I attach a footer to my documents without using SSI?

You can make arbitrary changes to static documents by configuring an Action which launches a CGI script. The CGI is then responsible for setting a content-type and delivering the requested document (the location of which is passed in the PATH_TRANSLATED environment variable), along with whatever footer is needed.

Busy sites may not want to run a CGI script on every request, and should consider using an Apache module to add the footer. There are several third party modules available through the Apache Module Registry which will add footers to documents. These include mod_trailer, PHP (php3_auto_append_file), mod_layout, and mod_perl (Apache::Sandwich).

Does Apache include a search engine?

Apache does not include a search engine, but there are many good commercial and free search engines which can be used easily with Apache. Some of them are listed on the Web Site Search Tools page. Open source search engines that are often used with Apache include ht://Dig and SWISH-E.

How can I rotate my log files?

The simple answer: by piping the transfer log into an appropriate log file rotation utility.

The longer answer: In the src/support/ directory, you will find a utility called rotatelogs which can be used like this:

TransferLog "|/path/to/rotatelogs /path/to/logs/access_log 86400
to enable daily rotation of the log files. A more sophisticated solution of a logfile rotation utility is available under the name cronolog from Andrew Ford's site at http://www.cronolog.org/. It can automatically create logfile subdirectories based on time and date, and can have a constant symlink point to the rotating logfiles. (As of version 1.6.1, cronolog is available under the Apache License). Use it like this:

CustomLog "|/path/to/cronolog --symlink=/usr/local/apache/logs/access_log /usr/local/apache/logs/%Y/%m/access_log" combined
How do I keep certain requests from appearing in my logs?

The maximum flexibility for removing unwanted information from log files is obtained by post-processing the logs, or using piped-logs to feed the logs through a program which does whatever you want. However, Apache does offer the ability to prevent requests from ever appearing in the log files. You can do this by using the SetEnvIf directive to set an environment variable for certain requests and then using the conditional CustomLog syntax to prevent logging when the environment variable is set.

Does Apache support any sort of database integration?

No. Apache is a Web (HTTP) server, not an application server. The base package does not include any such functionality. See the PHP project and the mod_perl project for examples of modules that allow you to work with databases from within the Apache environment.

Can I use Active Server Pages (ASP) with Apache?

The base Apache Web Server package does not include ASP support. However, a number of projects provide ASP or ASP-like functionality for Apache. Some of these are:

Apache::ASP
mod_mono
See also the related projects page to find out more.

Does Apache come with Java support?

The base Apache Web server package does not include support for Java, Java Server Pages, Enterprise Java Beans, or Java servlets. Those features are available as add-ons from other Apache projects such as Geronimo and Tomcat.

FAQ (last edited 2012-01-17 19:38:24 by TimBannister)
Immutable PageInfo
الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: رد: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:25 am

Background

What is Apache?

The Apache HTTP Server

is a powerful, flexible, HTTP/1.1 compliant web server
implements the latest protocols, including HTTP/1.1 (RFC2616)
is highly configurable and extensible with third-party modules
can be customised by writing 'modules' using the Apache module API
provides full source code and comes with an unrestrictive license
runs on Windows 2000, Netware 5.x and above, OS/2, and most versions of Unix, as well as several other operating systems
is actively being developed
encourages user feedback through new ideas, bug reports and patches
implements many frequently requested features, including:
DBM databases as well, as relational databases and LDAP for authentication
allows you to easily set up password-protected pages with enormous numbers of authorized users, without bogging down the server.
Customized responses to errors and problems
Allows you to set up files, or even CGI scripts, which are returned by the server in response to errors and problems, e.g. setup a script to intercept 500 Server Errors and perform on-the-fly diagnostics for both users and yourself.
Multiple DirectoryIndex directives - Allows you to say DirectoryIndex index.html index.cgi, which instructs the server to either send back index.html or run index.cgi when a directory URL is requested, whichever it finds in the directory.
Unlimited flexible URL rewriting and aliasing - Apache has no fixed limit on the numbers of Aliases and Redirects which may be declared in the config files. In addition, a powerful rewriting engine can be used to solve most URL manipulation problems.
Content negotiation - i.e. the ability to automatically serve clients of varying sophistication and HTML level compliance, with documents which offer the best representation of information that the client is capable of accepting.
Virtual Hosts - Allows the server to distinguish between requests made to different IP addresses or names (mapped to the same machine). Apache also offers dynamically configurable mass-virtual hosting.
Configurable Reliable Piped Logs - You can configure Apache to generate logs in the format that you want. In addition, on most Unix architectures, Apache can send log files to a pipe, allowing for log rotation, hit filtering, real-time splitting of multiple vhosts into separate logs, and asynchronous DNS resolving on the fly.
How and why was Apache HTTP Server created?

The About Apache document explains how the Apache project evolved from its beginnings as an outgrowth of the NCSA httpd project to its current status as one of the fastest, most efficient, and most functional web servers in existence.

Why the name "Apache"?

The name 'Apache' was chosen from respect for the Native American Indian tribe of Apache (Indé), well-known for their superior skills in warfare strategy and their inexhaustible endurance. For more information on the Apache Nation, we suggest searching Google, or AllTheWeb.

Secondarily, and more popularly (though incorrectly) accepted, it's a considered cute name which stuck. Apache is "A PAtCHy server". It was based on some existing code and a series of "patch files".

These days Apache as such means much more. It's first and foremost the Apache Software Foundation, under which there are dozens of projects.

How does Apache httpd performance compare to other servers?

Benchmarks tend to be a measure of configuration competance, rather than of server quality. That is, if you're an expert in IIS, you can probably get it to run faster than you can get Apache to run. You can therefore find comparisions of various HTTP servers that prove that each is faster than all the others. We tend to take server performance benchmarks with a grain of salt.

How thoroughly tested is Apache httpd?

Apache is run on over 120 million Internet servers (as of April 2010) (Source, Netcraft). It has been tested thoroughly by both developers and users. The Apache HTTP Server Project Management Committee maintains rigorous standards before releasing new versions of their server, and our server runs without a hitch on over one half of all WWW servers available on the Internet. When bugs do show up, we release patches and new versions as soon as they are available.

What are the future plans for Apache httpd?

to continue to be an "open source" no-charge-for-use HTTP server,
to keep up with advances in HTTP protocol and web developments in general,
to collect suggestions for fixes/improvements from its users,
to respond to needs of large volume providers as well as occasional users.
Whom do I contact for support?

See http://httpd.apache.org/support.html.

Is there any more information available on Apache httpd?

Indeed there is. See the main Apache web server site. There are also many books about the Apache HTTP Server available.

Where can I get Apache httpd?

You can find out how to download the source for Apache at the main Apache web server site.

Where can I download (certified) 64 bit Apache httpd binaries for Windows?

Right now, there are none. The Apache Software Foundation produces Open Source Software. The 32 bit binaries provided are a courtesy of the community members.

May I use the Apache logo on my product or Web site?

You may NOT use any original artwork from the Apache Software Foundation, nor make or use modified versions of such artwork, except under the conditions in the Apache Trademark Policy document.

B. General Technical Questions

"Why can't I ...? Why won't ... work?" What to do in case of problems

If you are having trouble with your Apache server software, you should take the following steps:

Check the errorlog!
Apache tries to be helpful when it encounters a problem. In many cases, it will provide some details by writing one or messages to the server error log. Sometimes this is enough for you to diagnose & fix the problem yourself (such as file permissions or the like). The default location of the error log is /usr/local/apache/logs/error_log, but see the ErrorLog directive in your config files for the location on your server.
Check the FAQ!
You're already here.
Check the Apache bug database
Most problems that get reported to The Apache Group are recorded in the bug database. Please check the existing reports, open and closed, before adding one. If you find that your issue has already been reported, please don't add a "me, too" report. If the original report isn't closed yet, we suggest that you check it periodically. You might also consider contacting the original submitter, because there may be an email exchange going on about the issue that isn't getting recorded in the database.
Ask in a user support group
A lot of common problems never make it to the bug database because there's already high Q&A traffic about them in the Users mailing list or comp.infosystems.www.servers.unix and related newsgroups. These newsgroups are also available via Google. Many Apache users, and some of the developers, can be found roaming their virtual halls, so it is suggested that you seek wisdom there. The chances are good that you'll get a faster answer there than from the bug database, even if you don't see your question already posted.
If all else fails, report the problem in the bug database
If you've gone through those steps above that are appropriate and have obtained no relief, then please do let The Apache Group know about the problem by logging a bug report.
If your problem involves the server crashing and generating a core dump, please include a backtrace (if possible). As an example,

# cd ServerRoot
# dbx httpd core
(dbx) where
(Substitute the appropriate locations for your ServerRoot and your httpd and core files. You may have to use gdb instead of dbx.)

How do I submit a patch to Apache httpd?

Detailed information for submitting bug reports and patches may be found in the Apache HTTP Server developer documentation.

Why has Apache stolen my favourite site's Internet address?

The simple answer is: "It hasn't." This misconception is usually caused by the site in question having migrated to the Apache Web server software, but not having migrated the site's content yet. When Apache is installed, the default page that gets installed tells the Webmaster the installation was successful. The expectation is that this default page will be replaced with the site's real content. If it doesn't, complain to the Webmaster, not to the Apache project -- we just make the software and aren't responsible for what people do (or don't do) with it.

Why am I getting spam mail from the Apache site?

The short answer is: "You aren't." Usually when someone thinks the Apache site is originating spam, it's because they've traced the spam to a Web site, and the Web site says it's using Apache. See the previous FAQ entry for more details on this phenomenon.

No marketing spam originates from the Apache site. The only mail that comes from the site goes only to addresses that have been requested to receive the mail.

May I include the Apache software on a CD or other package I'm distributing?

The detailed answer to this question can be found in the Apache license, which is included in the Apache distribution in the file LICENSE. You can also find it on the Web at http://www.apache.org/licenses/.

What's the best hardware/operating system/... How do I get the most out of my Apache Web server?

Check out the performance tuning page.

What are "regular expressions"?

Regular expressions are a way of describing a pattern - for example, "all the words that begin with the letter A" or "every 10-digit phone number" or even "Every sentence with two commas in it, and no capital letter Q". Regular expressions (aka "regex"s) are useful in Apache because they let you apply certain attributes against collections of files or resources in very flexible ways - for example, all .gif and .jpg files under any "images" directory could be written as /images/.*(jpg|gif)$. Note that httpd doesn't need the delimiting // so as to avoid "toothpicks" when matching URIs or paths, like: /\/foo\/bar\/?/

The best overview around is probably the one which comes with Perl. Apache's regular expressions use PCRE - Perl Compatible Regular Expressions.

Why isn't there a binary for my platform?

The developers make sure that the software builds and works correctly on the platforms available to them; this does not necessarily mean that your platform is one of them. In addition, the Apache HTTP server project is primarily source oriented, meaning that distributing valid and buildable source code is the purpose of a release, not making sure that there is a binary package for all of the supported platforms.

If you don't see a kit for your platform listed in the binary distribution area (http://httpd.apache.org/dist/httpd/binaries/), it means either that the platform isn't available to any of the developers, or that they just haven't gotten around to preparing a binary for it. As this is a voluntary project, they are under no obligation to do so. Users are encouraged and expected to build the software themselves.

The sole exception to these practices is the Windows package. Unlike most Unix and Unix-like platforms, Windows systems do not come with a bundled software development environment, so we do prepare binary kits for Windows when we make a release. Again, however, it's a voluntary thing and only a limited number of the developers have the capability to build the InstallShield package, so the Windows release may lag somewhat behind the source release. This lag should be no more than a few days at most.

C. Building Apache httpd

Why do I get an error about an undefined reference to "__inet_ntoa" or other __inet_* symbols?

If you have installed BIND-8 then this is normally due to a conflict between your include files and your libraries. BIND-8 installs its include files and libraries /usr/local/include/ and /usr/local/lib/, while the resolver that comes with your system is probably installed in /usr/include/ and /usr/lib/. If your system uses the header files in /usr/local/include/ before those in /usr/include/ but you do not use the new resolver library, then the two versions will conflict.

To resolve this, you can either make sure you use the include files and libraries that came with your system or make sure to use the new include files and libraries. Adding -lbind to the EXTRA_LDFLAGS line in your Configuration file, then re-running Configure, should resolve the problem. (Apache versions 1.2.* and earlier use EXTRA_LFLAGS instead.)

Note:As of BIND 8.1.1, the bind libraries and files are installed under /usr/local/bind by default, so you should not run into this problem. Should you want to use the bind resolvers you'll have to add the following to the respective lines:

EXTRA_CFLAGS=-I/usr/local/bind/include EXTRA_LDFLAGS=-L/usr/local/bind/lib EXTRA_LIBS=-lbind

I get an error about "configure failed for srclib/apr"

This only applies to Apache 2.4 and later

If you are building with the --with-included-apr option, you also need to download the *-deps tarball that matches the main release that you are trying to build, and extract it into the same directory.

Why won't Apache compile with my system's cc?

If the server won't compile on your system, it is probably due to one of the following causes:

The Configure script doesn't recognize your system environment.
This might be either because it's completely unknown or because the specific environment (include files, OS version, et cetera) isn't explicitly handled. If this happens, you may need to port the server to your OS yourself.
Your system's C compiler is garbage.
Some operating systems include a default C compiler that is either not ANSI C-compliant or suffers from other deficiencies. The usual recommendation in cases like this is to acquire, install, and use gcc.
Your include files may be confused.
In some cases, we have found that a compiler installation or system upgrade has left the C header files in an inconsistent state. Make sure that your include directory tree is in sync with the compiler and the operating system.
Your operating system or compiler may be out of revision.
Software vendors (including those that develop operating systems) issue new releases for a reason; sometimes to add functionality, but more often to fix bugs that have been discovered. Try upgrading your compiler and/or your operating system.
The Apache Group tests the ability to build the server on many different platforms. Unfortunately, we can't test all of the OS platforms there are. If you have verified that none of the above issues is the cause of your problem, and it hasn't been reported before, please submit a problem report. Be sure to include complete details, such as the compiler & OS versions and exact error messages.

Why do I get complaints about redefinition of "struct iovec" when compiling under Linux?

This is a conflict between your C library includes and your kernel includes. You need to make sure that the versions of both are matched properly. There are two workarounds, either one will solve the problem:

Remove the definition of struct iovec from your C library includes. It is located in /usr/include/sys/uio.h. Or, Add -DNO_WRITEV to the EXTRA_CFLAGS line in your Configuration and reconfigure/rebuild. This hurts performance and should only be used as a last resort.

I'm using gcc and I get some compilation errors, what is wrong?

GCC parses your system header files and produces a modified subset which it uses for compiling. This behavior ties GCC tightly to the version of your operating system. So, for example, if you were running IRIX 5.3 when you built GCC and then upgrade to IRIX 6.2 later, you will have to rebuild GCC. Similarly for Solaris 2.4, 2.5, or 2.5.1 when you upgrade to 2.6. Sometimes you can type "gcc -v" and it will tell you the version of the operating system it was built against.

If you fail to do this, then it is very likely that Apache will fail to build. One of the most common errors is with readv, writev, or uio.h. This is not a bug with Apache. You will need to re-install GCC.

D. Error Log Messages and Problems Starting Apache

Why do I get "setgid: Invalid argument" at startup?

Your Group directive (probably in conf/httpd.conf) needs to name a group that actually exists in the /etc/group file (or your system's equivalent). This problem is also frequently seen when a negative number is used in the Group directive (e.g., "Group #-1"). Using a group name -- not group number -- found in your system's group database should solve this problem in all cases.

Why am I getting "httpd: could not set socket option TCP_NODELAY" in my error log?

This message almost always indicates that the client disconnected before Apache reached the point of calling setsockopt() for the connection. It shouldn't occur for more than about 1% of the requests your server handles, and it's advisory only in any case.

Why am I getting "connection reset by peer" in my error log?

This is a normal message and nothing about which to be alarmed. It simply means that the client canceled the connection before it had been completely set up - such as by the end-user pressing the "Stop" button. People's patience being what it is, sites with response-time problems or slow network links may experience this more than high capacity ones or those with large pipes to the network.

The errorlog says Apache dumped core, but where's the dump file?

The error log message about dumped core includes the directory where the dump file should be located. However, many Unixes do not allow a process that has called setuid() to dump core for security reasons ('Is this still a problem?'); the typical Apache setup has the server started as root to bind to port 80, after which it uses setuid() to change UIDs to a non-privileged user to serve requests.

Dealing with this is extremely operating system-specific, and may require rebuilding your system kernel. Consult your operating system documentation or vendor for more information about whether your system does this and how to bypass it. If there is a documented way of bypassing it, it is recommended that you bypass it only for the httpd server process if possible.

The canonical location for Apache's core-dump files is the ServerRoot directory. The location can be set via the CoreDumpDirectory directive to a different directory. Make sure that this directory is writable by the user the server runs as (as opposed to the user the server is started as).

When I run it under Linux I get "shmget: function not found", what should I do?

Your kernel has been built without SysV IPC support. You will have to rebuild the kernel with that support enabled (it's under the "General Setup" submenu). Documentation for kernel building is beyond the scope of this FAQ; you should consult the Kernel HOWTO, or the documentation provided with your distribution, or a Linux newsgroup/mailing list. As a last-resort workaround, you can comment out the #define USE_SHMGET_SCOREBOARD definition in the LINUX section of src/conf.h and rebuild the server (prior to 1.3b4, simply removing #define HAVE_SHMGET would have sufficed). This will produce a server which is slower and less reliable.

Server hangs, or fails to start, and/or error log fills with "fcntl: F_SETLKW: No record locks available" or similar messages

These are symptoms of a file locking problem, which usually means that the server is trying to use a synchronization file on an NFS filesystem.

Because of its parallel-operation model, the Apache Web server needs to provide some form of synchronization when accessing certain resources. One of these synchronization methods involves taking out locks on a file, which means that the filesystem whereon the lockfile resides must support locking. In many cases this means it can't be kept on an NFS-mounted filesystem.

To cause the Web server to work around the NFS locking limitations, include a line such as the following in your server configuration files:


LockFile /var/run/apache-lock
The directory should not be generally writable (e.g., don't use /var/tmp). See the LockFile documentation for more information.

When I try to start Apache from a DOS window, I get a message like "Cannot determine host name. Use ServerName directive to set it manually." What does this mean?

It means what it says; the Apache software can't determine the hostname of your system. Edit your conf\httpd.conf file, look for the string "ServerName", and make sure there's an uncommented directive such as

ServerName localhost or

ServerName www.foo.com in the file. Correct it if there one there with wrong information, or add one if you don't already have one.

Also, make sure that your Windows system has DNS enabled. See the TCP/IP setup component of the Networking or Internet Options control panel.

After verifying that DNS is enabled and that you have a valid hostname in your ServerName directive, try to start the server again.
الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: رد: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:25 am


When I try to start Apache on Windows, I get a message like "System error 1067 has occurred. The process terminated unexpectedly." What does this mean?

This message means that the Web server was unable to start correctly for one reason or another. To find out why, execute the following commands in a DOS window:

c: cd "\Program Files\Apache Group\Apache" apache
(If you don't get the prompt back, hit Control-C to cause Apache to exit.)

The error you see will probably be one of those preceding this question in the FAQ.

First check the Windows NT Event Log for Application errors using the Windows NT/2000 Event Viewer program. Any errors that occur prior to opening the Apache error log will be stored here, if Apache is run as a Service on NT or 2000. As with any error, also check your Apache error log.

On a SuSE Linux system, I try and configure access control using basic authentication. Although I follow the example exactly, authentication fails, and an error message "admin: not a valid FDN: ...." is logged.

In the SuSE distribution, additional 3rd party authentication modules have been added and activated by default. These modules interfere with the Apache standard modules and cause Basic authentication to fail. Our recommendation is to comment all those modules in /etc/httpd/suse_addmodule.conf and /etc/httpd/suse_loadmodule.conf which are not actually required for running your server.

Why am I getting server restart messages periodically, when I did not restart the server?

Problem: You are noticing restart messages in your error log, periodically, when you know you did not restart the server yourself:


[Thu Jun 6 04:02:01 2002] [notice] SIGHUP received. Attempting to restart
[Thu Jun 6 04:02:02 2002] [notice] Apache configured -- resuming normal operations
Check your cron jobs to see when/if your server logs are being rotated. Compare the time of rotation to the error message time. If they are the same, you can somewhat safely assume that the restart is due to your server logs being rotated.

Why am I getting "module module-name is not compatible with this version of Apache" messages in my error log?

Module Magic Number (MMN) is a constant defined in Apache source that is associated with binary compatibility of modules. It is changed when internal Apache structures, function calls and other significant parts of API change in such a way that binary compatibility cannot be guaranteed any more. On MMN change, all third party modules have to be at least recompiled, sometimes even slightly changed in order to work with the new version of Apache.

If you're getting the above error messages, contact the vendor of the module for the new binary, or compile it if you have access to the source code.

E. Configuration Questions

Why can't I run more than <n> virtual hosts?

You are probably running into resource limitations in your operating system. The most common limitation is the per-process limit on file descriptors, which is almost always the cause of problems seen when adding virtual hosts. Apache often does not give an intuitive error message because it is normally some library routine (such as gethostbyname()) which needs file descriptors and doesn't complain intelligibly when it can't get them.

Each log file requires a file descriptor, which means that if you are using separate access and error logs for each virtual host, each virtual host needs two file descriptors. Each Listen directive also needs a file descriptor.

Typical values for <n> that we've seen are in the neighborhood of 1024 or 2048. When the server bumps into the file descriptor limit, it may dump core with a SIGSEGV, it might just hang, or it may limp along and you'll see (possibly meaningful) errors in the error log. One common problem that occurs when you run into a file descriptor limit is that CGI scripts stop being executed properly.

As to what you can do about this:

Reduce the number of Listen directives
If there are no other servers running on the machine on the same port then you normally don't need any Listen directives at all. By default Apache listens to all addresses on port 80.
Reduce the number of log files
You can use mod_log_config to log all requests to a single log file while including the name of the virtual host in the log file. You can then write a script to split the logfile into separate files later if necessary. Such a script is provided with the Apache distribution in the src/support/split-logfile file.
Increase the number of file descriptors available to the server
(see your system's documentation on the limit or ulimit commands). For some systems, information on how to do this is available in the performance hints page. There is a specific note for FreeBSD below.
"Don't do that" - try to run with fewer virtual hosts
Spread your operation across multiple server processes (using Listen for example, but see the first point) and/or ports. Since this is an operating-system limitation, there's not much else available in the way of solutions.

Why doesn't my ErrorDocument 401 work?

You need to use it with a URL in the form "/foo/bar" and not one with a method and hostname such as "http://host/foo/bar". See the ErrorDocument documentation for details. This was incorrectly documented in the past.

Why does Apache send a cookie on every response?

Apache does not automatically send a cookie on every response, unless you have re-compiled it with the mod_usertrack module, and specifically enabled it with the CookieTracking directive. This module may help track users, and uses cookies to do this. If you are not using the data generated by mod_usertrack, do not compile it into Apache.

Why don't my cookies work?

Apache httpd passes on your Set-Cookie header, like any other header. If cookies do not work it will be because your script does not work properly or your browser does not use cookies or is not set-up to accept them.

How do I add browsers and referrers to my logs?

Apache provides a couple of different ways of doing this. The recommended method is to compile the mod_log_config module into your configuration and use the CustomLog directive.

You can either log the additional information in files other than your normal transfer log, or you can add them to the records already being written. For example:

CustomLog logs/access_log "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""

This will add the values of the User-agent: and Referer: headers, which indicate the client and the referring page, respectively, to the end of each line in the access log.

You may want to check out the Apache Week article entitled: "Gathering Visitor Information: Customizing Your Logfiles".

Why does accessing directories only work when I include the trailing "/" (e.g., http://foo.domain.com/~user/) but not when I omit it (e.g., http://foo.domain.com/~user)?

When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.

Add a ServerName directive to the config file to tell it what the domain name of the server is.

The other thing that can occasionally cause this symptom is a misunderstanding of the Alias directive, resulting in an alias working with a trailing slash, and not without one. The Alias directive is very literal, and aliases what you tell it to. Consider the following example:

Alias /example/ /home/www/example/
The above directive creates an alias for URLs starting with /example/, but does not alias URLs starting with /example. That is to say, a URL such as http://servername.com/example/ will get the desired content, but a URL such as http://servername.com/example will result in a "file not found" error.

The following Alias, on the other hand, will work for both cases:

Alias /example /home/www/example
Why doesn't mod_info list any directives?

The mod_info module allows you to use a Web browser to see how your server is configured. Among the information it displays is the list of modules and their configuration directives. The "current" values for the directives are not necessarily those of the running server; they are extracted from the configuration files themselves at the time of the request. If the files have been changed since the server was last reloaded, the display will not match the values actively in use. If the files and the path to the files are not readable by the user as which the server is running (see the User directive), then mod_info cannot read them in order to list their values. An entry will be made in the error log in this event, however.

My .htaccess files are being ignored.

This is almost always due to your AllowOverride directive being set incorrectly for the directory in question. If it is set to None then .htaccess files will not even be looked for. That is a good thing. If you have access to edit the httpd.conf, you should not use .htaccess files, ever. If your customers do need support for .htaccess, make sure that AllowOverride is set to something sensible (i.e.: Not All). Be certain it covers the directory you are trying to use the .htaccess file in. This is normally accomplished by ensuring it is inside the proper Directory container.

You can tell if this is your problem by adding nonsense text to your .htaccess file and reloading the page. If you do not get a server error, then Apache httpd is not reading your .htaccess file.

Why do I get a "Forbidden" message whenever I try to access a particular directory?

This message is generally caused because either

The underlying file system permissions do not allow the User/Group under which Apache is running to access the necessary files; or
The Apache configuration has some access restrictions in place which forbid access to the files.
You can determine which case applies to your situation by checking the error log.

In the case where file system permission are at fault, see (13) Permission Denied for more info.

Why do my files appear correctly in Internet Explorer, but show up as source or trigger a save window with Netscape; or, Why doesn't Internet Explorer render my text/plain document correctly?

MS Internet Explorer (MSIE) and Netscape handle mime type detection in different ways, and therefore will display the document differently. In particular, IE sometimes relies on the file extension or the contents of the file to determine the mime type. This can happen when the server specifies a mime type of application/octet-stream or text/plain. This behavior violates the the HTTP standard and makes it impossible to deliver plain text documents to MSIE clients in some cases. More details are available on MSIE's mime type detection behavior in an MSDN article and a note by Alan J. Flavell.

The best you can do as a server administrator is to accurately configure the mime type of your documents by editing the mime.types file or using an AddType directive in the Apache configuration files. In some cases, you may be able to fool MSIE into rendering text/plain documents correctly by assuring they have a .txt filename extension, but this will not work if MSIE thinks the content looks like another file type.

My site is accessible under many different hostnames; how do I redirect clients so that they see only a single name?

Many sites map a variety of hostnames to the same content. For example, www.example.com, example.com and www.example.net may all refer to the same site. It is best to make sure that, regardless of the name clients use to access the site, they will be redirected to a single, canonical hostname. This makes the site easier to maintain and assures that there will be only one version of the site in proxy caches and search engines.

There are two techniques to implement canonical hostnames:

Use mod_rewrite as described in the "Canonical Hostnames" section of the URL Rewriting Guide.

See http://httpd.apache.org/docs/current/rewrite/rewrite_guide.html#canonicalurl.

Use name-based virtual hosting:

NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.example.net
ServerAlias example.com
Redirect permanent / http://www.example.com/
</VirtualHost>

<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>
Why can I access my website from the server or from my local network, but I can't access it from elsewhere on the Internet?

There are many possible reasons for this, and almost all of them are related to the configuration of your network, not the configuration of the Apache HTTP Server. One of the most common problems is that a firewall blocks access to the default HTTP port 80. In particular, many consumer ISPs block access to this port. You can see if this is the case by changing any Port and Listen directives in httpd.conf to use port 8000 and then request your site using http://yourhost.example.com:8000/. (Of course, a very restrictive firewall may block this port as well.)

How do I turn automatic directory listings on or off?

If a client requests a URL that designates a directory and the directory does not contain a filename that matches the DirectoryIndex directive, then mod_autoindex can be configured to present a listing of the directory contents.

To turn on automatic directory indexing, find the Options directive that applies to the directory and add the Indexes keyword. For example:

<Directory /path/to/directory>
Options +Indexes
</Directory>
To turn off automatic directory indexing, remove the Indexes keyword from the appropriate Options line. To turn off directory listing for a particular subdirectory, you can use Options -Indexes. For example:

<Directory /path/to/directory>
Options -Indexes
</Directory>
Why do my Options directives not have the desired effect?

Directives placed in the configuration files are applied in a very particular order, as described by How Directory, Location, and Files sections work. In addition, each Options directive has the effect of resetting the options to none before adding the specified options (unless only "+" and "-" options are used). The consequence is that Options set in the main server or virtual host context (outside any directory, location, or files section) will usually have no effect, because they are overridden by more specific Options directives. For example, in the following


<Directory /usr/local/apache/htdocs>
Options Indexes
</Directory>
Options Includes ExecCGI
Includes and ExecCGI will be off in the /usr/local/apache/htdocs directory.

You can usually avoid problems by either finding the Options directive that already applies to a specific directory and changing it, or by putting your Options directive inside the most specific possible <Directory> section.

How can I change the information that Apache returns about itself in the headers?

When a client connects to Apache, part of the information returned in the headers is the name "Apache" Additional information that can be sent is the version number, such as "2.2.17", the operating system, and a list of non-standard modules you have installed.

For example:

Server: Apache/2.2.17 (Unix) mod_perl/1.26 Frequently, people want to remove this information, under the mistaken understanding that this will make the system more secure. This is probably not the case, as the same exploits will likely be attempted regardless of the header information you provide.

There are, however, two answers to this question: the correct answer, and the answer that you are probably looking for.

The correct answer to this question is that you should use the ServerTokens directive to alter the quantity of information which is passed in the headers. Setting this directive to Prod will pass the least possible amount of information:

Server: Apache The answer you are probably looking for is how to make Apache lie about what what it is, ie send something like:

Server: Bob's Happy HTTPd Server In order to do this, you will need to modify the Apache source code and rebuild Apache. This is not advised, as it is almost certain not to provide you with the added security you think that you are gaining. The exact method of doing this is left as an exercise for the reader, as we are not keen on helping you do something that is intrinsically a bad idea.

Why do I see requests for other sites appearing in my log files?

An access_log entry showing this situation could look like this:

63.251.56.142 - - [25/Jul/2002:12:48:04 -0700] "GET http://www.yahoo.com/ HTTP/1.0" 200 1456 The question is: why did a request for www.yahoo.com come to your server instead of Yahoo's server? And why does the response have a status code of 200 (success)?

This is usually the result of malicious clients trying to exploit open proxy servers to access a website without revealing their true location. If you find entries like this in your log, the first thing to do is to make sure you have properly configured your server not to proxy for unknown clients. If you don't need to provide a proxy server at all, you should simply assure that the ProxyRequests directive is not set on. If you do need to run a proxy server, then you must ensure that you secure your server properly so that only authorized clients can use it.

If your server is configured properly, then the attempt to proxy through your server will fail. If you see a status code of 404 (file not found) in the log, then you know that the request failed. If you see a status code of 200 (success), that does not necessarily mean that the attempt to proxy succeeded. RFC2616 section 5.1.2 mandates that Apache must accept requests with absolute URLs in the request-URI, even for non-proxy requests. Since Apache has no way to know all the different names that your server may be known under, it cannot simply reject hostnames it does not recognize. Instead, it will serve requests for unknown sites locally by stripping off the hostname and using the default server or virtual host. Therefore you can compare the size of the file (1456 in the above example) to the size of the corresponding file in your default server. If they are the same, then the proxy attempt failed, since a document from your server was delivered, not a document from www.yahoo.com.

If you wish to prevent this type of request entirely, then you need to let Apache know what hostnames to accept and what hostnames to reject. You do this by configuring name-virtual hosts, where the first listed host is the default host that will catch and reject unknown hostnames. For example:


NameVirtualHost *:80

<VirtualHost *:80>
ServerName default.only
<Location />
Order allow,deny
Deny from all
</Location>
</VirtualHost>

<VirtualHost *:80>
ServerName realhost1.example.com
ServerAlias alias1.example.com alias2.example.com
DocumentRoot /path/to/site1
</VirtualHost>
...
F. Dynamic Content (CGI and SSI)

How do I enable CGI execution in directories other than the ScriptAlias?

Apache recognizes all files in a directory named as a ScriptAlias as being eligible for execution rather than processing as normal documents. This applies regardless of the file name, so scripts in a ScriptAlias directory don't need to be named "*.cgi" or "*.pl" or whatever. In other words, all files in a ScriptAlias directory are scripts, as far as Apache is concerned.

To persuade Apache to execute scripts in other locations, such as in directories where normal documents may also live, you must tell it how to recognize them - and also that it's okay to execute them. For this, you need to use something like the AddHandler directive.

In an appropriate section of your server configuration files, add a line such as AddHandler cgi-script .cgi The server will then recognize that all files in that location (and its logical descendants) that end in ".cgi" are script files, not documents.

Make sure that the directory location is covered by an Options declaration that includes the ExecCGI option. In some situations, you might not want to actually allow all files named "*.cgi" to be executable. Perhaps all you want is to enable a particular file in a normal directory to be executable. This can be alternatively accomplished via mod_rewrite and the following steps:

Locally add to the corresponding .htaccess file a ruleset similar to this one:

RewriteEngine on
RewriteBase /~foo/bar/
RewriteRule ^quux\.cgi$ - [T=application/x-httpd-cgi]
Make sure that the directory location is covered by an Options declaration that includes the ExecCGI and FollowSymLinks option.

What does it mean when my CGIs fail with "Premature end of script headers"?

It means just what it says: the server was expecting a complete set of HTTP headers (one or more followed by a blank line), and didn't get them.

The most common cause of this problem is the script dying before sending the complete set of headers, or possibly any at all, to the server. To see if this is the case, try running the script standalone from an interactive session, rather than as a script under the server. If you get error messages, this is almost certainly the cause of the "premature end of script headers" message. Even if the CGI runs fine from the command line, remember that the environment and permissions may be different when running under the web server. The CGI can only access resources allowed for the User and Group specified in your Apache configuration. In addition, the environment will not be the same as the one provided on the command line, but it can be adjusted using the directives provided by mod_env.

The second most common cause of this (aside from people not outputting the required headers at all) is a result of an interaction with Perl's output buffering. To make Perl flush its buffers after each output statement, insert the following statements around the print or write statements that send your HTTP headers:


{
my $current_file_handle = select (STDOUT);
local $| = 1;
#
# print your HTTP headers here
#
select ($current_file_handle);
}
This is generally only necessary when you are calling external programs from your script that send output to stdout, or if there will be a long delay between the time the headers are sent and the actual content starts being emitted. To maximize performance, you should turn buffer-flushing back off (with $| = 0 or the equivalent) after the statements that send the headers, as displayed above.

If your script isn't written in Perl, do the equivalent thing for whatever language you are using (e.g., for C, call fflush() after writing the headers).

Another cause for the "premature end of script headers" message are the RLimitCPU and RLimitMEM directives. You may get the message if the CGI script was killed due to a resource limit.

In addition, a configuration problem in suEXEC, mod_perl, or another third party module can often interfere with the execution of your CGI and cause the "premature end of script headers" message.

Why do I keep getting "Method Not Allowed" for form POST requests?

This is almost always due to Apache not being configured to treat the file you are trying to POST to as a CGI script. You can not POST to a normal HTML file; the operation has no meaning. See the FAQ entry on CGIs outside ScriptAliased directories for details on how to configure Apache to treat the file in question as a CGI.

How do I enable SSI (parsed HTML)?

SSI (an acronym for Server-Side Include) directives allow static HTML documents to be enhanced at run-time (e.g., when delivered to a client by Apache). The format of SSI directives is covered in the mod_include manual; suffice it to say that Apache supports not only SSI but xSSI (eXtended SSI) directives.

Processing a document at run-time is called parsing it; hence the term "parsed HTML" sometimes used for documents that contain SSI instructions. Parsing tends to be resource-consumptive compared to serving static files, and is not enabled by default. It can also interfere with the cachability of your documents, which can put a further load on your server. (See the next question for more information about this.)

To enable SSI processing, you need to

Build your server with the mod_include module. This is normally compiled in by default.
Make sure your server configuration files have an Options directive which permits Includes.
Make sure that the directory where you want the SSI documents to live is covered by the "INCLUDEES" content filter, either explicitly or in some ancestral location. That can be done with the following directives:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
This indicates that all files ending in ".shtml" in that location (or its descendants) should be parsed. Note that using ".html" will cause all normal HTML files to be parsed, which may put an inordinate load on your server.

For additional information, see the mod_include documentation.

Why don't my parsed files get cached?

Since the server is performing run-time processing of your SSI directives, which may change the content shipped to the client, it can't know at the time it starts parsing what the final size of the result will be, or whether the parsed result will always be the same. This means that it can't generate Content-Length or Last-Modified headers. Caches commonly work by comparing the Last-Modified of what's in the cache with that being delivered by the server. Since the server isn't sending that header for a parsed document, whatever's doing the caching can't tell whether the document has changed or not - and so fetches it again to be on the safe side.

You can work around this in some cases by causing an Expires header to be generated. (See the mod_expires documentation for more details.) Another possibility is to use the XBitHack Full mechanism, which tells Apache to send (under certain circumstances detailed in the XBitHack directive description) a Last-Modified header based upon the last modification time of the file being parsed. Note that this may actually be lying to the client if the parsed file doesn't change but the SSI-inserted content does; if the included content changes often, this can result in stale copies being cached.

How can I have my script output parsed?

So you want to include SSI directives in the output from your CGI script, but can't figure out how to do it? The short answer is "you can't." This is potentially a security liability and, more importantly, it can not be cleanly implemented under the current server API. The best workaround is for your script itself to do what the SSIs would be doing. After all, it's generating the rest of the content.

SSIs don't work for VirtualHosts and/or user home directories.

This is almost always due to having some setting in your config file that sets "Options Includes" or some other setting for your DocumentRoot but not for other directories. If you set it inside a Directory section, then that setting will only apply to that directory.

Why is the environment variable REMOTE_USER not set?

This variable is set and thus available in SSI or CGI scripts if and only if the requested document was protected by access authentication. For an explanation on how to implement these restrictions, see Apache Week's articles on Using User Authentication or DBM User Authentication.

Hint: When using a CGI script to receive the data of a HTML FORM, notice that protecting the document containing the FORM is not sufficient to provide REMOTE_USER to the CGI script. You have to protect the CGI script, too. Or alternatively only the CGI script (then authentication happens only after filling out the form).

How do I allow each of my user directories to have a cgi-bin directory?

Remember that CGI execution does not need to be restricted only to cgi-bin directories. You can allow CGI script execution in arbitrary parts of your filesystem.

There are many ways to give each user directory a cgi-bin directory such that anything requested as http://example.com/~user/cgi-bin/program will be executed as a CGI script. Two alternatives are:

Place the cgi-bin directory next to the public_html directory:

ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
Place the cgi-bin directory underneath the public_html directory:
<Directory /home/*/public_html/cgi-bin>
Options ExecCGI
SetHandler cgi-script
</Directory>
If you are using suexec, the first technique will not work because CGI scripts must be stored under the public_html directory.

G. Authentication and Access Restrictions

Why isn't restricting access by host or domain name working correctly?

Two of the most common causes of this are:

An error, inconsistency, or unexpected mapping in the DNS registration
This happens frequently: your configuration restricts access to Host.FooBar.Com, but you can't get in from that host. The usual reason for this is that Host.FooBar.Com is actually an alias for another name, and when Apache performs the address-to-name lookup it's getting the real name, not Host.FooBar.Com. You can verify this by checking the reverse lookup yourself. The easiest way to work around it is to specify the correct host name in your configuration.

Inadequate checking and verification in your configuration of Apache
If you intend to perform access checking and restriction based upon the client's host or domain name, you really need to configure Apache to double-check the origin information it's supplied. You do this by adding this to your configuration:

HostnameLookups Double
This will cause Apache to be very paranoid about making sure a particular host address is really assigned to the name it claims to be. Note that this can incur a significant performance penalty, however, because of all the name resolution requests being sent to a nameserver.

How do I set up Apache to require a username and password to access certain documents?

There are several ways to do this; some of the more popular ones are to use the mod_authn_file, mod_authn_dbd, or mod_authnz_ldap modules.

For an explanation on how to implement these restrictions, see the authentication tutorial in the Apache HTTP Server documentation.

How do I set up Apache to allow access to certain documents only if a site is either a local site or the user supplies a password and username?

Use the Satisfy directive, in particular the Satisfy Any directive, to require that only one of the access restrictions be met. For example, adding the following configuration to a .htaccess or server configuration file would restrict access to people who either are accessing the site from a host under domain.com or who can supply a valid username and password:


Deny from all
Allow from .domain.com
AuthType Basic
AuthUserFile /usr/local/apache/conf/htpasswd.users
AuthName "special directory"
Require valid-user
Satisfy any
See the user authentication question and the mod_authnz_host module for details on how the above directives work.

Why does my authentication give me a server error?

Under normal circumstances, the Apache access control modules will pass unrecognized user IDs on to the next access control module in line. Only if the user ID is recognized and the password is validated (or not) will it give the usual success or "authentication failed" messages.

However, if the last access module in line 'declines' the validation request (because it has never heard of the user ID or because it is not configured), the http_request handler will give one of the following, confusing, errors:

check access
check user. No user file?
check access. No groups file?
This does not mean that you have to add an 'AuthUserFile /dev/null' line as some magazines suggest!

The solution is to ensure that at least the last module is authoritative and CONFIGURED. By default, mod_auth is authoritative and will give an OK/Denied, but only if it is configured with the proper AuthUserFile. Likewise, if a valid group is required. (Remember that the modules are processed in the reverse order from that in which they appear in your compile-time Configuration file.)

A typical situation for this error is when you are using the mod_auth_dbm, mod_auth_msql, mod_auth_mysql, mod_auth_anon or mod_auth_cookie modules on their own. These are by default not authoritative, and this will pass the buck on to the (non-existent) next authentication module when the user ID is not in their respective database. Just add the appropriate 'XXXAuthoritative yes' line to the configuration.

In general it is a good idea (though not terribly efficient) to have the file-based mod_auth a module of last resort. This allows you to access the web server with a few special passwords even if the databases are down or corrupted. This does cost a file open/seek/close for each request in a protected area.

Do I have to keep the (SQL) authentication information on the same machine?

Some organizations feel very strongly about keeping the authentication information on a different machine than the webserver. With the mod_auth_msql, mod_auth_mysql, and other SQL modules connecting to (R)DBMses this is quite possible. Just configure an explicit host to contact.

Be aware that with mSQL and Oracle, opening and closing these database connections is very expensive and time consuming. You might want to look at the code in the auth_* modules and play with the compile time flags to alleviate this somewhat, if your RDBMS licences allow for it.

Can I use my /etc/passwd file for Web page authentication?

Yes, you can - but it's a very bad idea. Here are some of the reasons:

The Web technology provides no governors on how often or how rapidly password (authentication failure) retries can be made. That means that someone can hammer away at your system's root password using the Web, using a dictionary or similar mass attack, just as fast as the wire and your server can handle the requests. Most operating systems these days include attack detection (such as n failed passwords for the same account within m seconds) and evasion (breaking the connection, disabling the account under attack, disabling all logins from that source, et cetera), but the Web does not.
An account under attack isn't notified (unless the server is heavily modified); there's no "You have 19483 login failures" message when the legitimate owner logs in.
Without an exhaustive and error-prone examination of the server logs, you can't tell whether an account has been compromised. Detecting that an attack has occurred, or is in progress, is fairly obvious, though - if you look at the logs.
Web authentication passwords (at least for Basic authentication) generally fly across the wire, and through intermediate proxy systems, in what amounts to plain text. "O'er the net we go/Caching all the way;/O what fun it is to surf/Giving my password away!"
Since HTTP is stateless, information about the authentication is transmitted each and every time a request is made to the server. Essentially, the client caches it after the first successful access, and transmits it without asking for all subsequent requests to the same server.
It's relatively trivial for someone on your system to put up a page that will steal the cached password from a client's cache without them knowing. Can you say "password grabber"?
If you still want to do this in light of the above disadvantages, the method is left as an exercise for the reader. It'll void your Apache warranty, though, and you'll lose all accumulated UNIX guru points.

Why does Apache ask for my password twice before serving a file?

If the hostname under which you are accessing the server is different than the hostname specified in the ServerName directive, then depending on the setting of the UseCanonicalName directive, Apache will redirect you to a new hostname when constructing self-referential URLs. This happens, for example, in the case where you request a directory without including the trailing slash.

When this happens, Apache will ask for authentication once under the original hostname, perform the redirect, and then ask again under the new hostname. For security reasons, the browser must prompt again for the password when the host name changes.

To eliminate this problem you should

Always use the trailing slash when requesting directories;
Change the ServerName to match the name you are using in the URL;
and/or Set UseCanonicalName off.
How can I prevent people from "stealing" the images from my web site?

The goal here is to prevent people from inlining your images directly from their web site, but accessing them only if they appear inline in your pages.

This can be accomplished with a combination of SetEnvIf and the Deny and Allow directives. However, it is important to understand that any access restriction based on the REFERER header is intrinsically problematic due to the fact that browsers can send an incorrect REFERER, either because they want to circumvent your restriction or simply because they don't send the right thing (or anything at all).

The following configuration will produce the desired effect if the browser passes correct REFERER headers.


SetEnvIf REFERER "www\.mydomain\.com" linked_from_here
SetEnvIf REFERER "^$" linked_from_here

<Directory /www/images>
Order deny,allow
Deny from all
Allow from env=linked_from_here
</Directory>
Further examples can be found in the Environment Variables documentation.

H. URL Rewriting

Where can I find mod_rewrite rulesets which already solve particular URL-related problems?

There is a collection of practical solutions that can be found in the URL Rewriting Guide. If you have more interesting rulesets which solve particular problems not currently covered in this document, open a doc suggestion in bugzilla to add it. The other webmasters will thank you for avoiding the reinvention of the wheel.

Where can I find any published information about URL-manipulations and mod_rewrite?

There is an article from Ralf S. Engelschall about URL-manipulations based on mod_rewrite in the "iX Multiuser Multitasking Magazin" issue #12/96. The German (original) version can be read online at <http://www.heise.de/ix/artikel/1996/12/149/>, the English (translated) version can be found at <http://www.heise.de/ix/artikel/E/1996/12/149/>.

Why is mod_rewrite so difficult to learn and seems so complicated?

Hmmm... there are a lot of reasons. First, mod_rewrite itself is a powerful module which can help you in really all aspects of URL rewriting, so it can be no trivial module per definition. To accomplish its hard job it uses software leverage and makes use of a powerful regular expression library by Henry Spencer. And regular expressions itself can be difficult to newbies, while providing the most flexible power to the advanced hacker.

On the other hand mod_rewrite has to work inside the Apache API environment and needs to do some tricks to fit there. For instance the Apache API really was not designed for URL rewriting at the .htaccess level of processing. Or the problem of multiple rewrites in sequence, which is also not handled by the API per design. To provide this features mod_rewrite has to do some special (but API compliant!) handling which leads to difficult processing inside the Apache kernel. While the user usually doesn't see anything of this processing, it can be difficult to find problems when some of your RewriteRules seem not to work.

What can I do if my RewriteRules don't work as expected?

Use "RewriteLog somefile" and "RewriteLogLevel 9" and have a precise look at the steps the rewriting engine performs. This is really the only one and best way to debug your rewriting configuration.

Why don't some of my URLs get prefixed with DocumentRoot when using mod_rewrite?

If the rule starts with /somedir/... make sure that really no /somedir exists on the filesystem if you don't want to lead the URL to match this directory, i.e., there must be no root directory named somedir on the filesystem. Because if there is such a directory, the URL will not get prefixed with DocumentRoot. This behavior looks ugly, but is really important for some other aspects of URL rewriting.

How can I make all my URLs case-insensitive with mod_rewrite?

You can't! The reasons are: first, that, case translations for arbitrary length URLs cannot be done via regex patterns and corresponding substitutions. One needs a per-character pattern like the sed/Perl tr|..|..| feature. Second, just making URLs always upper or lower case does not solve the whole problem of case-INSENSITIVE URLs, because URLs actually have to be rewritten to the correct case-variant for the file residing on the filesystem in order to allow Apache to access the file. And the Unix filesystem is always case-SENSITIVE.

But there is a module named mod_speling.c in the Apache distribution. Try this module to help correct people who use mis-cased URLs.

Why are RewriteRules in my VirtualHost parts ignored?

Because you have to enable the engine for every virtual host explicitly due to security concerns. Just add a "RewriteEngine on" to your virtual host configuration parts.

How can I use strings with whitespaces in RewriteRule's ENV flag?

There is only one ugly solution: You have to surround the complete flag argument by quotation marks ("[E=...]"). Notice: The argument to quote here is not the argument to the E-flag, it is the argument of the Apache config file parser, i.e., the third argument of the RewriteRule here. So you have to write "[E=any text with whitespaces]".

I. Features

Does or will Apache act as a Proxy server?

mod_proxy provides proxying functionality for a variety of protocols.

What are "multiviews"?

"Multiviews" is the general name given to the Apache server's ability to provide language-specific document variants in response to a request. This is documented quite thoroughly in the content negotiation description page. In addition, Apache Week carried an article on this subject entitled "Content Negotiation Explained".

Why can't I publish to my Apache server using PUT on Netscape Gold and other programs?

Because you need to install and configure a script to handle the uploaded files. This script is often called a "PUT" handler. There are several available, but they may have security problems. Using FTP uploads may be easier and more secure, at least for now. For more information, see the Apache Week article Publishing Pages with PUT.

How can I attach a footer to my documents without using SSI?

You can make arbitrary changes to static documents by configuring an Action which launches a CGI script. The CGI is then responsible for setting a content-type and delivering the requested document (the location of which is passed in the PATH_TRANSLATED environment variable), along with whatever footer is needed.

Busy sites may not want to run a CGI script on every request, and should consider using an Apache module to add the footer. There are several third party modules available through the Apache Module Registry which will add footers to documents. These include mod_trailer, PHP (php3_auto_append_file), mod_layout, and mod_perl (Apache::Sandwich).

Does Apache include a search engine?

Apache does not include a search engine, but there are many good commercial and free search engines which can be used easily with Apache. Some of them are listed on the Web Site Search Tools page. Open source search engines that are often used with Apache include ht://Dig and SWISH-E.

How can I rotate my log files?

The simple answer: by piping the transfer log into an appropriate log file rotation utility.

The longer answer: In the src/support/ directory, you will find a utility called rotatelogs which can be used like this:

TransferLog "|/path/to/rotatelogs /path/to/logs/access_log 86400
to enable daily rotation of the log files. A more sophisticated solution of a logfile rotation utility is available under the name cronolog from Andrew Ford's site at http://www.cronolog.org/. It can automatically create logfile subdirectories based on time and date, and can have a constant symlink point to the rotating logfiles. (As of version 1.6.1, cronolog is available under the Apache License). Use it like this:

CustomLog "|/path/to/cronolog --symlink=/usr/local/apache/logs/access_log /usr/local/apache/logs/%Y/%m/access_log" combined
How do I keep certain requests from appearing in my logs?

The maximum flexibility for removing unwanted information from log files is obtained by post-processing the logs, or using piped-logs to feed the logs through a program which does whatever you want. However, Apache does offer the ability to prevent requests from ever appearing in the log files. You can do this by using the SetEnvIf directive to set an environment variable for certain requests and then using the conditional CustomLog syntax to prevent logging when the environment variable is set.

Does Apache support any sort of database integration?

No. Apache is a Web (HTTP) server, not an application server. The base package does not include any such functionality. See the PHP project and the mod_perl project for examples of modules that allow you to work with databases from within the Apache environment.

Can I use Active Server Pages (ASP) with Apache?

The base Apache Web Server package does not include ASP support. However, a number of projects provide ASP or ASP-like functionality for Apache. Some of these are:

Apache::ASP
mod_mono
See also the related projects page to find out more.

Does Apache come with Java support?

The base Apache Web server package does not include support for Java, Java Server Pages, Enterprise Java Beans, or Java servlets. Those features are available as add-ons from other Apache projects such as Geronimo and Tomcat.

FAQ (last edited 2012-01-17 19:38:24 by TimBannister)
Immutable PageInfo
الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: رد: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:26 am


ما هو اباتشي؟

وأباتشي خادم HTTP

هو ومرنة قوية، وشبكة متوافقة مع HTTP/1.1 خادم
تطبق على أحدث البروتوكولات، بما في ذلك HTTP/1.1 (RFC2616)
هو شكلي للغاية وقابلة للتوسيع مع طرف ثالث وحدات
يمكن تخصيصها من خلال كتابة "وحدات" باستخدام وحدة اباتشي API
يقدم كامل شفرة المصدر ويأتي مع رخصة مقيد
يعمل على ويندوز 2000، 5.X Netware و أعلاه، OS / 2، ومعظم إصدارات يونيكس، فضلا عن العديد من أنظمة التشغيل الأخرى
وبنشاط التي يجري تطويرها
تشجع ردود الفعل المستخدم من خلال أفكار جديدة، والتقارير الشوائب والبقع
وتنفذ العديد من الميزات المطلوبة بشكل متكرر، بما في ذلك:
DBM قواعد البيانات كذلك، وقواعد البيانات العلائقية وLDAP للمصادقة
يسمح لك بسهولة انشاء محمية بكلمة مرور صفحات مع أعداد هائلة من المستخدمين المصرح لهم، دون التعثر بانخفاض الخادم.
مخصصة الردود على الأخطاء والمشكلات
يسمح لك إعداد الملفات، أو حتى نصوص CGI، والتي يتم إرجاعها من قبل الملقم استجابة للأخطاء والمشاكل، على سبيل المثال إعداد سيناريو لاعتراض أخطاء خادم 500 ونفذ على رأس ذبابة التشخيص لكل من المستخدمين ونِفَسٌ ك.
متعددة DirectoryIndex توجيهات - يسمح لك لنقول DirectoryIndex index.html وindex.cgi، الذي يرشد الخادم لإرسال index.html وإما العودة أو تشغيل index.cgi عند طلب URL الدليل، أيهما يجدها في الدليل.
URL مرن غير محدود اعادة كتابة والتعرج - أباتشي ليس له حدود ثابتة على عدد من الأسماء المستعارة والموجهات التي قد تعلن في ملفات التكوين. وبالإضافة إلى ذلك، يمكن استخدام محرك قوي إعادة كتابة إلى حل معظم المشاكل تلاعب URL.
التفاوض محتوى - أي القدرة على خدمة العملاء تلقائيا متفاوتة التطور وHTML مستوى الامتثال، مع الوثائق التي تقدم أفضل تمثيل من المعلومات التي تفيد بأن العميل قادر على الموافقة.
المضيفين الظاهري - يسمح الملقم للتمييز بين الطلبات التي قدمت إلى عناوين IP مختلفة أو أسماء (تعيينها إلى نِفَسٌ الجهاز). أباتشي كما يقدم شكلي حيوي الشامل استضافة الظاهري.
شكلي موثوق سجلات الأنابيب - يمكنك تكوين أباتشي لتوليد سجلات في الشكل الذي تريده. ضرب وبالإضافة إلى ذلك، في معظم أبنية يونيكس، أباتشي يمكن أن ترسل ملفات السجل إلى أنبوب، والسماح لتناوب السجل، والترشيح، في الوقت الحقيقي من تقسيم vhosts متعددة في سجلات منفصلة، ​​وغير المتزامن حل DNS على الطاير.
كيف ولماذا تم إنشاء أباتشي HTTP خادم؟

في وثيقة أباتشي حول ما يفسر كيف أن مشروع أباتشي تطورت من بداياتها وذلك امتدادا للمشروع هتبد NCSA إلى وضعه الحالي واحدة من أسرع وخوادم الويب الأكثر كفاءة، وظيفية أكثر في وجود.

لماذا اسم "أباتشي"؟

وقد تم اختيار "أباتشي" على اسم من الاحترام لقبيلة الهنود الأميركيين الأصليين من نوع اباتشي (INDE)، معروف جيدا لمهاراتهم الفائقة في استراتيجية الحرب وقدرتهم على التحمل لا ينضب. لمزيد من المعلومات عن الأمة أباتشي، نقترح البحث غوغل، أو روابط إلى .

ثانوي، وأكثر من ذلك شعبيا (على الرغم من بشكل غير صحيح) وقبلت، انها اسم لطيف النظر الذي تمسك. اباتشي هو "ملقم غير مكتمل". كان هذا بناء على بعض التعليمات البرمجية الموجودة، وسلسلة من "ملفات التصحيح".

هذه أباتشي أيام على هذا النحو يعني أكثر من ذلك بكثير. إنها أولا وقبل كل شيء مؤسسة البرمجيات أباتشي، والتي بموجبها هناك العشرات من المشاريع.

كيف يمكن للاباتشي HTTPD أداء مقارنة إلى خوادم أخرى؟

المعايير تميل الى ان تكون على قدر من competance التكوين، بدلا من جودة الخدمة. وهذا هو، إذا كنت خبيرا في IIS، يمكنك الحصول على الأرجح ليتم تشغيله بشكل أسرع من التي يمكنك الحصول عليها لتشغيل أباتشي. يمكنك أن تجد لذلك comparisions من ملقمات HTTP المختلفة التي تثبت أن كل أسرع من كل الآخرين. ونحن نميل إلى اتخاذ معايير أداء الخادم مع حبة الملح.

كيف اختباره هو اباتشي HTTPD؟

يتم تشغيل اباتشي على خوادم الإنترنت أكثر من 120 مليون دينار (اعتبارا من أبريل 2010) (المصدر، نيتكرافت ). وقد تم اختباره بشكل دقيق من قبل كل من المطورين والمستخدمين. مشروع أباتشي خادم HTTP إدارة اللجنة على معايير صارمة قبل إطلاق إصدارات جديدة من الخادم الخاص بهم، والخادم يعمل دون وجود عوائق على أكثر من نصف من كافة ملقمات WWW المتوفرة على شبكة الإنترنت. عندما البق لا تظهر، ونحن الافراج عن بقع والإصدارات الجديدة حالما تصبح متاحة.

ما هي الخطط المستقبلية لهتبد أباتشي؟

إلى الاستمرار في القيام بدور "المصادر المفتوحة" وبدون تكلفة مقابل استخدام HTTP خادم،
لمواكبة التطورات في بروتوكول HTTP والتطورات على شبكة الإنترنت بشكل عام،
لجمع مقترحات لإصلاحات / تحسينات من مستخدميها،
للاستجابة لاحتياجات مقدمي حجم كبير وكذلك المستخدمين في بعض الأحيان.
الذي يمكنني الاتصال به للحصول على الدعم؟

انظر http://httpd.apache.org/support.html .

هل هناك أي مزيد من المعلومات المتاحة عن اباتشي httpd؟

في الواقع هناك. راجع موقع الويب Apache الرئيسي الخادم . وهناك أيضا العديد من الكتب حول الملقم HTTP أباتشي المتاحة.

أين يمكنني الحصول على هتبد أباتشي؟

يمكنك معرفة كيفية تحميل مصدر للأباتشي في موقع رئيسي أباتشي خادم الويب .

أين يمكنني تحميل (مصدقة) 64 اباتشي httpd ثنائيات بت لنظام التشغيل Windows؟

في الوقت الراهن، لا يوجد أحد. وتنتج المؤسسة برامج أباتشي مفتوحة المصدر البرامج. الثنائيات 32 بت المقدمة هي من باب المجاملة لأفراد المجتمع.

اسمحوا لي أن استخدام شعار اباتشي على المنتج الخاص بي أو موقع ويب؟

لا يجوز لك استخدام أي العمل الفني الأصلي من مؤسسة البرمجيات أباتشي، ولا تقديم، أو استخدام نسخ معدلة من هذه الأعمال الفنية، إلا وفقا للشروط في سياسة أباتشي العلامات التجارية الوثيقة.

B. العام أسئلة فنية

"لماذا لا أستطيع ...؟ لماذا لا ... العمل؟" ما يجب القيام به في حالة حدوث مشاكل

إذا كنت تواجه مشكلة مع برنامج خادم أباتشي، يجب اتخاذ الخطوات التالية:

التحقق من errorlog!
أباتشي يحاول أن يكون مفيدا عندما يواجه مشكلة. في كثير من الحالات، فإنه سيتم تقديم بعض التفاصيل عن طريق كتابة واحد أو رسائل إلى خادم سجل خطأ. أحيانا هذا يكفي بالنسبة لك لتشخيص وعلاج هذه المشكلة نِفَسٌ ك (مثل أذونات الملف أو ما شابه ذلك). الموقع الافتراضي لسجل الخطأ هو / البيرة / المحلية / اباتشى / السجلات / error_log، لكنهم يرون أن ErrorLog التوجيه في ملفات التكوين لموقع على الخادم الخاص بك.
التحقق من التعليمات!
كنت بالفعل هنا.
فحص قاعدة البيانات الخطأ أباتشي
وتسجل معظم المشاكل التي تحصل أبلغ بها الفريق اباتشي في قاعدة البيانات الخطأ. يرجى الاطلاع على التقارير الموجودة، مفتوحة ومغلقة، قبل أن يضيف واحدة. إذا وجدت أنه تم بالفعل مشكلتك ذكرت، من فضلك لا تضيف "أنا أيضا" تقرير. إذا لم يتم إغلاق التقرير الأصلي حتى الآن، ونحن نقترح عليك مراجعة بشكل دوري. هل يمكن أن تنظر أيضا الاتصال المرسل الأصلي، لأنه قد يكون هناك تبادل الكتروني يدور حول هذه القضية التي لم يتم الحصول على تسجيلها في قاعدة البيانات.
نسأل مستخدم في فريق الدعم
وهناك الكثير من المشاكل المشتركة لا يصل الى قاعدة البيانات الخطأ لأنه لا يوجد بالفعل سؤال وجواب ارتفاع حركة المرور حول لهم في القائمة البريدية للمستخدمين أو comp.infosystems.www.servers.unix ومجموعات الأخبار ذات الصلة. هذه الأخبار هي أيضا متوفرة عبر غوغل. ويمكن الاطلاع على العديد من المستخدمين أباتشي، وبعض من المطورين، والتجوال بقاعاتها الظاهري، لذلك يقترح أن كنت تسعى حكمة هناك. وهناك احتمالات جيدة لأنك سوف تحصل على الجواب أسرع من هناك من قاعدة البيانات الخطأ، حتى لو كنت لا ترى سؤالك نشرت بالفعل.
إذا فشل كل شيء آخر، تقريرا عن مشكلة في قاعدة البيانات الخطأ
إذا كنت قد ذهبت من خلال تلك الخطوات المذكورة أعلاه أن تكون مناسبة وأن يتم الحصول على أي الإغاثة، ثم الرجاء ترك الفريق أباتشي تعرف عن هذه المشكلة من خلال تسجيل تقرير الخطأ.
إذا كانت المشكلة تنطوي على خادم تحطمها وتوليد تفريغ الأساسية، يرجى تشمل التتبع المعاكس (إن أمكن). كمثال على ذلك،

# مؤتمر نزع السلاح ServerRoot
هتبد DBX # الأساسية
(DBX) حيث
(البديل المواقع المناسبة لجهودكم ServerRoot وهتبد والملفات الأساسية. قد تضطر إلى استخدام GDB بدلا من DBX).

كيف يمكنني تقديم تصحيحا لهتبد أباتشي؟

ويمكن الاطلاع على معلومات مفصلة عن تقديم التقارير الشوائب والبقع في وثائق HTTP أباتشي خادم المطور .

لماذا سرقت أباتشي عنوان موقعي المفضل على الانترنت؟

الجواب بسيط هو: "من لم يفعل ذلك." وعادة ما تسبب هذا المفهوم الخاطئ من موقع في السؤال بعد أن هاجر إلى خادم أباتشي برامج الانترنت، ولكن ليس بعد أن هاجر محتوى الموقع حتى الآن. عندما يتم تثبيت أباتشي، الصفحة الافتراضية أن يحصل على تثبيت يقول مسؤول الموقع إلى نجاح عملية التثبيت. التوقع هو أنه سيتم استبدال هذه الصفحة الافتراضية مع محتوى الموقع الحقيقي. إذا لم يحدث ذلك، يشكو مسؤول الموقع، وليس إلى مشروع أباتشي - نحن فقط جعل البرنامج وغير مسؤولة عن ما يفعله الناس (أو لا تفعل) معها.

لماذا أحصل على البريد المزعج من موقع أباتشي؟

الجواب القصير هو: "أنت لا." عادة عندما يقوم شخص ما يعتقد أن موقع أباتشي ينشأ الرسائل غير المرغوب فيها، فذلك لأنها قد تتبع الرسائل غير المرغوب فيها إلى موقع ويب، وموقع ويب تقول انها تستخدم أباتشي. راجع إدخال التعليمات السابقة لمزيد من التفاصيل حول هذه الظاهرة.

لا البريد المزعج تسويق تنبع من موقع أباتشي. البريد الوحيد الذي يأتي من موقع يذهب فقط إلى عناوين التي تم طلبها لتلقي البريد.

أنا قد تشمل البرمجيات أباتشي على قرص مضغوط أو حزمة أخرى أنا توزيع؟

يمكن العثور على إجابة مفصلة على هذا السؤال في رخصة أباتشي، والتي يتم تضمينها في توزيع اباتشي في ملف الترخيص. يمكنك أن تجد أيضا على شبكة الإنترنت في http://www.apache.org/licenses/ .

ما هو أفضل الأجهزة / نظام التشغيل / ... كيف يمكنني الحصول على أقصى استفادة من خدمة بلدي الويب اباتشي؟

اطلع على صفحة ضبط الأداء .

ما هي "التعابير العادية"؟

التعابير العادية هي طريقة لوصف نمط - على سبيل المثال، "كل الكلمات التي تبدأ بحرف A" أو "كل رقم الهاتف 10 مكونة" أو حتى "في كل جملة مع اثنين من الفواصل في ذلك، وليس رأس المال س حرف" . التعابير العادية (ويعرف أيضا باسم "رجإكس" ليالي) مفيدة في أباتشي لأنها تتيح لك تطبيق سمات معينة ضد مجموعات من الملفات أو الموارد في طرق مرنة للغاية - على سبيل المثال، جميع ملفات GIF و JPG تحت أي دليل "صور" يمكن أن تكون مكتوبة. كما / صور / *. (JPG | GIF) $ . لاحظ أن هتبد ليست بحاجة الى ترسيم / / وذلك لتجنب "المسواك" عند مطابقة أو محددات المسارات، مثل: ؟ / \ / فو \ / شريط \ / /

أفضل نظرة عامة حول هو على الارجح احد والتي تأتي مع بيرل . تعبيرات أباتشي العادية استخدام PCRE - بيرل التعبير العادية متوافق .

لماذا لا يكون هناك ثنائي لبرنامجي؟

للمطورين تأكد من أن البرنامج يبني ويعمل بشكل صحيح على الأنظمة الأساسية المتاحة لهم، وهذا لا يعني بالضرورة أن النظام الأساسي الخاص بك هو واحد منهم. وبالإضافة إلى ذلك، ملقم HTTP أباتشي المشروع هو في المقام الأول مصدر المنحى، وهذا يعني أن توزيع سارية المفعول ويمكن البناء عليها شفرة المصدر هو الغرض من بيان، وليس التأكد من أن هناك حزمة ثنائي لجميع الأنظمة الأساسية المعتمدة.

إذا كنت لا نرى ان هناك عدة عن النظام الأساسي الخاص بك المدرجة في مجال التوزيع ثنائي ( http://httpd.apache.org/dist/httpd/binaries/ )، فهذا يعني إما أن النظام الأساسي لا تتوفر على أي من للمطورين، أو أنها فقط لم نصل في جميع أنحاء لإعداد ثنائي لذلك. لأن هذا هو مشروع طوعي، فهي ليست ملزمة للقيام بذلك. ويتم تشجيع المستخدمين، ومن المتوقع أن بناء البرمجيات أنِفَسٌ هم.

الاستثناء الوحيد لهذه الممارسات هو حزمة ويندوز. وخلافا لمعظم منصات يونيكس ويونيكس مثل، أنظمة ويندوز لا تأتي مع بيئة تطوير البرمجيات المجمعة، لذلك نحن لا تعد مجموعات ثنائي لنظام التشغيل Windows عندما نتخذ بيان. مرة أخرى، ومع ذلك، فإنه أمر طوعي، وسوى عدد محدود من المطورين لديها القدرة على بناء InstallShield حزمة، وبالتالي فإن إطلاق ويندوز قد تأخر بعض الشيء وراء الافراج عن المصدر. وينبغي أن يكون هذا الفارق ليس أكثر من بضعة أيام على الأكثر.

جيم هتبد مبنى أباتشي

لماذا أحصل على خطأ عن مرجع غير معروف "ل__inet_ntoa" أو غيرها من الرموز inet_ __ *؟

إذا كنت قد قمت بتثبيت BIND-8 ثم وهذا هو عادة بسبب وجود صراع بين الملفات وتشمل والمكتبات الخاصة بك. BIND-8 يثبت لها وتشمل الملفات والمكتبات / البيرة / المحلية / وتشمل / و / البيرة / المحلية / ليب /، في حين تم تثبيت ربما محلل الذي يأتي مع النظام الخاص بك في / البيرة / وتشمل / و / البيرة / ليب /. إذا كان النظام يستخدم الملفات رأس في / البيرة / المحلية / وتشمل / قبل تلك الموجودة في / البيرة / وتشمل / لكنك لا تستخدم المكتبة محلل جديد، ثم النسختين سوف تتعارض.

لحل هذه المشكلة، يمكنك جعل إما من استخدام وتشمل الملفات والمكتبات التي تأتي مع النظام أو للتأكد من استخدام جديدة تشمل الملفات والمكتبات. مضيفا-lbind إلى خط EXTRA_LDFLAGS في ملف التكوين الخاص بك، ثم إعادة تشغيل تكوين، وينبغي حل هذه المشكلة. (الإصدارات أباتشي 1.2. * وEXTRA_LFLAGS استخدام في وقت سابق بدلا من ذلك.)

ملاحظة: اعتبارا من BIND 8.1.1، يتم تثبيت مكتبات ربط والملفات تحت / البيرة / المحلية / ربط افتراضيا، لذلك يجب أن لا تصل الى هذه المشكلة. وينبغي أن كنت ترغب في استخدام حل له ربط سيكون لديك لإضافة التالية إلى خطوط كل منها:

EXTRA_CFLAGS = -I/usr/local/bind/include EXTRA_LDFLAGS = -L/usr/local/bind/lib EXTRA_LIBS =-lbind

أحصل على خطأ حول "تكوين فشل srclib / أبريل"

هذا لا ينطبق إلا على اباتشي 2.4 و في وقت لاحق

إذا كنت بناء مع الخيار - مع-شمل-APR، تحتاج أيضا إلى تحميل كتل القطران *-deps يطابق الافراج الرئيسية التي تحاول بناء، واستخراج عليه في نِفَسٌ الدليل.

لماذا لا أباتشي ترجمة مع نسخة نظام بلدي؟

إذا كان الملقم لن تجميع على النظام الخاص بك، وربما هو نتيجة لأحد الأسباب التالية:

السيناريو تكوين بيئة لا تعترف النظام الخاص بك.
وهذا قد يكون إما لأنه غير معروف تماما، أو لأنه لم يتم التعامل مع بيئة معينة (وتشمل الملفات، إصدار نظام التشغيل، وهلم جرا) بشكل صريح. إذا حدث هذا، قد تحتاج إلى منفذ الخادم لنظام التشغيل الخاص بك نِفَسٌ ك.
النظام الخاص بك C المترجم هو جمع ونقل النفايات.
بعض أنظمة التشغيل وتشمل مترجم C الافتراضية التي قد تكون غير متوافقة مع ANSI C أو يعاني من أوجه قصور أخرى. التوصية المعتادة في مثل هذه الحالات هو الحصول على وتركيب واستخدام دول مجلس التعاون الخليجي.
قد يتم الخلط بين الخاص بك تتضمن الملفات.
في بعض الحالات، وجدنا أن ترقية أو تثبيت نظام البرمجي قد ترك الملفات رأس C في حالة غير متناسقة. تأكد من أن شجرة الخاص يضم الدليل هو متزامنا مع مترجم ونظام التشغيل.
قد نظام التشغيل الخاص بك أو المترجم أن يكون للخروج من التنقيح.
بائعي البرامج (بما فيها تلك التي تطور أنظمة التشغيل) إصدار نشرات جديدة لسبب ما، وأحيانا لإضافة وظيفة، ولكن في كثير من الأحيان لتصحيح الأخطاء التي تم اكتشافها. محاولة رفع مستوى المترجم الخاص بك و / أو نظام التشغيل الخاص بك.
مجموعة أباتشي اختبارات القدرة على بناء الخادم على منصات مختلفة. لسوء الحظ، لا يمكننا اختبار كل من منصات نظام التشغيل هناك. إذا كنت قد تحققت من أن أيا من القضايا المذكورة أعلاه هو سبب المشكلة، وألا يكون قد ذكرت من قبل، ويرجى تقديم تقرير مشكلة. مما لا شك فيه لتشمل تفاصيل كاملة، مثل المترجم وإصدارات نظام التشغيل ورسائل الخطأ بالضبط.

لماذا أحصل على شكاوى حول إعادة تعريف "iovec البنية" عند ترجمة تحت لينكس؟

هذا هو صراع بين الخاص C مكتبة تضم وتضم النواة. كنت بحاجة للتأكد من أن تتم مطابقة إصدارات على حد سواء بشكل صحيح. هناك نوعان من الحلول، أي واحد سوف تحل المشكلة:

إزالة تعريف iovec البنية من مكتبة C الخاص بك يتضمن. وتقع في / البيرة / وتشمل / SYS / uio.h. أو،على خط EXTRA_CFLAGS في التكوين الخاص بك وإعادة تكوين / اعادة بناء إضافة DNO_WRITEV. هذا يضر الأداء ويجب استخدامه فقط كملاذ أخير.

أنا باستخدام دول مجلس التعاون الخليجي وأحصل على بعض أخطاء ترجمة، ما هو الخطأ؟

دول مجلس التعاون الخليجي بتوزيع الملفات رأس النظام وتنتج مجموعة فرعية تعديل الذي يستخدم لتجميع. هذا السلوك يربط بين دول مجلس التعاون الخليجي بإحكام على إصدار نظام التشغيل الخاص بك. هكذا، على سبيل المثال، إذا كنت تعمل IRIX 5.3 عند بني دول مجلس التعاون الخليجي ومن ثم الترقية إلى IRIX 6،2 في وقت لاحق، وسوف تضطر إلى إعادة بناء دول مجلس التعاون الخليجي. وبالمثل لسولاريس 2.4، 2.5، 2.5.1 أو عند الترقية إلى 2.6. في بعض الأحيان يمكنك كتابة "دول مجلس التعاون الخليجي-V"، وسوف اقول لكم نسخة من نظام التشغيل تم بناؤها ضد.

إذا فشلت في القيام بذلك، فمن المرجح جدا أن أباتشي ستفشل لبناء. أحد الأخطاء الأكثر شيوعا هو مع readv، writev، أو uio.h. هذه ليست علة مع اباتشي. وسوف تحتاج إلى إعادة تثبيت دول مجلس التعاون الخليجي.

رسائل د. سجل خطأ ومشاكل في بدء تشغيل أباتشي

لماذا أحصل على "setgid: الوسيطة غير صالحة" عند بدء التشغيل؟

التوجيه الخاص المجموعة (وربما في أسيوط / httpd.conf و) يحتاج لتسمية مجموعة موجودة فعلا في الملف / الخ / مجموعة (أو ما يعادلها النظام الخاص بك). كما أن هذه المشكلة ينظر في كثير من الأحيان عندما يتم استخدام رقم سالب في توجيه المجموعة (على سبيل المثال، "المجموعة # -1"). باستخدام اسم المجموعة - وليس عدد مجموعة - أن وجدت في قاعدة بيانات مجموعة النظام الخاص بك حل هذه المشكلة في جميع الحالات.

لماذا أحصل على "هتبد: لا يمكن وضع مأخذ TCP_NODELAY خيار" في سجل خطأ الخاص بي؟

هذه الرسالة دائما تقريبا يشير إلى أن العميل قبل قطع أباتشي وصلنا الى نقطة استدعاء setsockopt () للاتصال. فإنه لا ينبغي أن تحدث لأكثر من حوالي 1٪ من الطلبات الخادم يعالج، وانها استشارية فقط على أي حال.

لماذا أحصل على "إعادة الاتصال عن طريق الأقران" في سجل خطأ الخاص بي؟

هذه هي رسالة عادية وشيئا عن الذي ليشعروا بالذعر. وهو ما يعني ببساطة أن العميل إلغاء الاتصال قبل قد وضعتها تماما حتى - مثل من قبل المستخدم النهائي الضغط على "إيقاف" الزر. صبر الشعب يجري ما هو عليه، قد المواقع مع الاستجابة في الوقت مشاكل أو ارتباطات الشبكة بطيئة واجهت هذه أكثر من تلك القدرة العالية أو تلك مع أنابيب كبيرة على الشبكة.

ويقول errorlog أباتشي ملقاة الأساسية، ولكن أين هو ملف تفريغ؟

الرسالة سجل خطأ عن جوهر ملقاة يتضمن الدليل حيث ملف تفريغ يجب أن يكون موجودا. ومع ذلك، Unixes كثيرة لا تسمح للعملية التي ودعت setuid () لتفريغ الأساسية لأسباب أمنية ('هل هذا ما زالت مشكلة؟')؛ الإعداد أباتشي نموذجي لديه خادم بدأت كجذر لربط المنفذ 80، وبعد ذلك ويستخدم setuid () لتغيير UIDs لمستخدم غير المميز لخدمة الطلبات.

التعامل مع هذا النظام يعمل غاية محددة، وربما تتطلب إعادة بناء نواة النظام الخاص بك. راجع وثائق نظام التشغيل الخاص بك أو بائع للحصول على مزيد من المعلومات حول ما إذا كان النظام يفعل ذلك، وكيفية الالتفاف عليها. إذا كان هناك طريقة موثقة لتجاوز ذلك، فمن المستحسن أن يمكنك تجاوز ذلك فقط من أجل عملية HTTPD الخادم إذا كان ذلك ممكنا.

الموقع الكنسي عن الملفات الأساسية تفريغ اباتشي هو ServerRoot الدليل. ويمكن تعيين موقع عبر CoreDumpDirectory التوجيه إلى دليل مختلف. تأكد من أن هذا الدليل غير قابل للكتابة من قبل المستخدم والخادم يعمل على (خلافا للمستخدم بدء تشغيل الخادم كما هو).

عند تشغيل على لينكس أحصل على "shmget: لم يتم العثور على وظيفة"، فماذا أفعل؟

وقد تم بناء النواة من دون دعم IPC SysV. سيكون لديك لإعادة بناء نواة مع أن تمكين دعم (انها تحت عنوان "العام إعداد" قائمة فرعية). وثائق لبناء نواة هي خارج نطاق هذه التعليمات، يجب عليك استشارة HOWTO النواة، أو الوثائق المرفقة مع توزيعتك، أو لينكس قائمة الأخبار / البريدية. كحل أخير، يمكنك تعليق خارج # تعريف تعريف USE_SHMGET_SCOREBOARD في القسم لينكس من SRC / conf.h وإعادة بناء الخادم (قبل 1.3b4، وإزالة ببساطة تعريف # HAVE_SHMGET سيكون كافيا). هذا وسوف تنتج الخادم الذي هو أبطأ وأقل موثوقية.

توقف الخادم، أو فشل بدء، و / أو سجل خطأ يملأ مع "fcntl: F_SETLKW: لا يوجد سجل اقفال المتاحة" الرسائل أو ما شابه ذلك

هذه هي أعراض ملف مشكلة تأمين، والتي عادة ما يعني أن الخادم يحاول استخدام ملف التزامن على نظام الملفات NFS.

بسبب نموذج مواز، عملياتها، وخادم ويب أباتشي في حاجة إلى توفير شكل من أشكال التزامن عند الوصول إلى موارد معينة. واحد من هذه الأساليب تزامن ينطوي على اتخاذ اقفال على ملف، وهو ما يعني أن الملفات بارزون في lockfile يقيم يجب أن يعتمد تأمين. في كثير من الحالات يمكن أن يعني هذا أنه لا يمكن إبقاء على نظام الملفات NFS محمولة.

تسبب خادم الويب إلى العمل حول قيود قفل NFS، وتشمل خط مثل التالية في ملفات تكوين الملقم:


LockFile / فار / تشغيل / أباتشي للانغلاق
وينبغي أن لا يكون الدليل قابل للكتابة بشكل عام (على سبيل المثال، لا تستخدم / فار / TMP). راجع LockFile الوثائق لمزيد من المعلومات.

عندما أحاول بدء أباتشي من نافذة دوس، أحصل على رسالة مثل "لا يمكن تحديد اسم المضيف. استخدام الخادم التوجيه لتعيين يدويا." ماذا يعني هذا؟

فهو يعني ما يقول، والبرمجيات أباتشي لا يمكن تحديد اسم المضيف من النظام الخاص بك. تحرير أسيوط بك \ ملف httpd.conf، والبحث عن السلسلة " الخادم "، وتأكد من أن هناك توجيها uncommented مثل

الخادم المضيف المحليأو

الخادم www.foo.comفي الملف. تصحيح ذلك إذا كان هناك أحد هناك مع معلومات خاطئة، أو إضافة واحدة إذا لم يكن لديك بالفعل واحدة.

أيضا، تأكد من أن لديك نظام ويندوز وتمكين DNS. راجع مكون إعداد TCP / IP من شبكة الإنترنت أو لوحة التحكم خيارات.

بعد التحقق من أن يتم تمكين DNS وأن يكون لديك اسم المضيف في صالح الخاص بك الخادم التوجيه، في محاولة لبدء تشغيل الخادم مرة أخرى.

"حدث خطأ النظام 1067. تم إنهاء العملية بشكل غير متوقع." عندما أحاول بدء تشغيل اباتشي على ويندوز، وأحصل على رسالة مثل ماذا يعني هذا؟

هذه الرسالة يعني أن خادم الويب لم يتمكن من البدء بشكل صحيح لسبب أو لآخر. لمعرفة السبب، وتنفيذ الأوامر التالية في إطار DOS:

ج: مؤتمر نزع السلاح "\ ملفات البرنامج \ اباتشي مجموعة \ اباتشي" أباتشي
(ضرب إذا كنت لا تحصل على الجزء الخلفي الفوري، والتحكم C-تسبب أباتشي للخروج.)

وسوف ترى الخطأ من المحتمل أن يكون واحدة من تلك التي سبقت هذا السؤال في أسئلة وأجوبة.

أولا التحقق من الأحداث Windows NT سجل للأخطاء التطبيق باستخدام برنامج ويندوز NT/2000 حدث عارض. وسيتم تخزين أي الأخطاء التي تحدث قبل فتح سجل الخطأ أباتشي هنا، إذا تم تشغيل أباتشي ويهدف الى خدمة على NT أو 2000. كما هو الحال مع أي خطأ، والتحقق من السجل الخاص بك أيضا خطأ أباتشي.

على نظام لينكس سوزي، وأنا أحاول وتكوين لمراقبة الدخول باستخدام المصادقة الأساسية. على الرغم من أنني تحذو حذو بالضبط، فشل المصادقة، ورسالة خطأ "مشرف: لا قوات الدفاع الوطني صالحة: ...". يتم تسجيل.

في توزيع سوزي، وقد أضيفت إضافية مصادقة طرف 3 وحدات وتفعيلها من خلال التقصير. هذه الوحدات تتداخل مع وحدات قياسية أباتشي وتسبب المصادقة الأساسية للفشل. توصية لدينا هو أن أعلق كل هذه الوحدات في / الخ / httpd / suse_addmodule.conf و / الخ / httpd / suse_loadmodule.conf التي ليست مطلوبة في الواقع لتشغيل الخادم الخاص بك.

لماذا أتلقى رسائل الخادم إعادة دوريا، عندما لم أكن إعادة تشغيل الملقم؟

المشكلة: أنت يلاحظ رسائل إعادة التشغيل في سجل خطأ الخاص بك، وبشكل دوري، عندما كنت أعلم أنك لم إعادة تشغيل الملقم نِفَسٌ ك:


[خميس 6 يونيو 04:02:01 2002] تلقى [إشعار] SIGHUP. محاولة إعادة تشغيل
[خميس 6 يونيو 04:02:02 2002] [إشعار] أباتشي تكوين - استئناف العمليات العادية
فحص وظائف كرون لمعرفة عندما / إذا سجلات الخادم الخاص بك ويجري تدويرها. قارن ذلك الوقت من تناوب على خطأ وقت الرسالة. إذا كانت هي نِفَسٌ ها، يمكنك بأمان إلى حد ما تفترض أن إعادة التشغيل ومن المقرر أن خادم بتسجيل تناوبت.

لماذا أحصل على "وحدة نمطية الوحدة النمطية اسم غير متوافق مع هذا الإصدار من طراز أباتشي" رسائل في سجل خطأ الخاص بي؟

وحدة الرقم السحري (MMN) هو ثابت المعرفة في مصدر أباتشي مقترن التوافق ثنائي من وحدات. يتم تغييره عندما الهياكل الداخلية أباتشي، والمكالمات وظيفة وأجزاء كبيرة أخرى من API تغيير في مثل هذه الطريقة التي لا يمكن أن توافق ثنائي يمكن ضمان أي أكثر. بشأن تغير MMN، جميع وحدات طرف ثالث يجب أن تكون على الأقل معاد، وأحيانا قليلا حتى تغير من أجل العمل مع الإصدار الجديد من طراز أباتشي.

اذا كنت تريد الحصول على رسائل الخطأ أعلاه، اتصل ببائع من وحدة لثنائي جديد، أو ترجمة عليه إذا كان لديك الوصول إلى شفرة المصدر.

أسئلة تكوين E.

لماذا لا أستطيع تشغيل أكثر من المضيفين الظاهري <N>؟

كنت تشغل على الأرجح إلى محدودية الموارد في نظام التشغيل الخاص بك. الحد الأكثر شيوعا هو الحد لكل عملية على واصف ملف، والذي هو دائما تقريبا سبب مشاكل النظر عند إضافة المضيفين الظاهري. أباتشي في كثير من الأحيان لا يعطي رسالة خطأ بديهية لأنه عادة ما يكون بعض روتين مكتبة (مثل ل gethostbyname ()) التي تحتاج إلى واصف ملف ولا يشكو intelligibly عند فإنه لا يمكن الحصول عليها.

كل ملف السجل يتطلب واصف الملف، مما يعني أنه إذا كنت تستخدم وصول منفصلة وسجلات الخطأ لكل المضيف الظاهري، كل مضيف ظاهري يحتاج اصفات ملف اثنين. كل توجيهات استماع يحتاج أيضا على واصف ملف.

القيم النموذجية ل<N> التي شهدناها هي في حدود 1024 أو 2048. عندما المطبات الخادم في ملف الحد اصف، قد تفريغ الأساسية مع SIGSEGV، فإنه قد يتعطل فقط، أو أنه قد عرج على طول وسترى (ذات مغزى ربما) أخطاء في سجل خطأ. مشكلة واحدة المشتركة التي تحدث عند تشغيل في ملف الحد اصف هو أن يوقف تنفيذ نصوص CGI بشكل صحيح.

على ما يمكنك القيام به حيال ذلك:

خفض عدد استمع توجيهات
إذا لم تكن هناك خوادم أخرى تعمل على الجهاز على نِفَسٌ المنفذ ثم تقوم عادة لا تحتاج إلى أي استمع توجيهات على الإطلاق. افتراضيا أباتشي يستمع الى جميع العناوين على المنفذ 80.
تخفيض عدد ملفات السجل
يمكنك استخدام mod_log_config لتسجيل جميع الطلبات إلى ملف سجل واحد في حين بما في ذلك اسم المضيف الظاهري في ملف السجل. يمكنك كتابة السيناريو ثم لتقسيم ملف السجل إلى ملفات منفصلة في وقت لاحق إذا لزم الأمر. ويرد مثل هذا السيناريو مع توزيع أباتشي في SRC / الدعم / تقسيم ملف التسجيل ملف.
زيادة عدد واصفي ملف المتاحة للخادم
(راجع وثائق النظام الخاص بك في الحد أو أوامر ulimit). بالنسبة لبعض النظم، ومعلومات عن كيفية القيام بذلك يتوفر في أداء تلميحات صفحة. هناك مذكرة محددة لفري أدناه.
"لا تفعل ذلك" - محاولة تشغيل عدد أقل من الجنود مع الظاهرية
نشر العملية الخاصة بك عبر العمليات خادم متعددة (باستخدام استمع على سبيل المثال، ولكن انظر النقطة الأولى) و / أو الموانئ. وبما أن هذا هو الحد من نظام التشغيل، ليس هناك الكثير آخر متاح في طريق الحلول.

لماذا لا عملي ErrorDocument 401؟

أنت في حاجة لاستخدامها مع URL في النموذج "/ فو / شريط" وليس واحد مع أسلوب واسم المضيف مثل " http://host/foo/bar ". راجع ErrorDocument ثائق للحصول على التفاصيل. وقد تم توثيق هذا بشكل غير صحيح في الماضي.

لماذا اباتشي إرسال ملف على كل ذلك؟

أباتشي لا يرسل تلقائيا ملف على كل ردا على ذلك، إلا إذا قمت بإعادة تجميعها مع وحدة mod_usertrack، ومكن ذلك بشكل خاص مع CookieTracking التوجيه. هذه الوحدة قد تساعد المستخدمين على المسار، ويستعمل الكوكيز للقيام بذلك. إذا كنت لا تستخدم البيانات الناتجة عن mod_usertrack، لا ترجمة عليه في أباتشي.

لماذا لا الكوكيز العمل؟

اباتشي HTTPD يمر على رأس تعيين كوكي الخاص بك، مثل أي رأس أخرى. إذا الكوكيز لا تعمل وسوف يكون ذلك بسبب السيناريو الخاص بك لا يعمل بشكل صحيح أو متصفحك لا تستخدم الكوكيز أو لم يتم تعيين المتابعة لقبولهم.

كيف يمكنني إضافة برامج التصفح والمشيرين إلى سجلاتي؟

اباتشي يوفر عدة طرق مختلفة للقيام بذلك. الأسلوب المستحسن هو تجميع وحدة mod_log_config في التكوين الخاص بك واستخدام CustomLog التوجيه.

يمكنك تسجيل الدخول إما على معلومات إضافية في ملفات أخرى من السجل الخاص بك نقل عادي، أو يمكنك إضافتها إلى سجلات بالفعل مكتوب. على سبيل المثال:

CustomLog سجلات / access_log "ح٪٪٪ ل ش ر٪ \"٪ ص \ "٪ S٪ ب \"٪ {المرجعية} أنا \ "\"٪ {عامل المستخدم} أنا \ ""

وهذا إضافة قيم وكيل المستخدم: والمرجعية: رؤوس، والتي تشير إلى العميل وتشير صفحة، على التوالي، في نهاية كل سطر في سجل وصول.

قد ترغب في الإطلاع على مقال الاسبوع أباتشي بعنوان: "معلومات الزوار اللقاء: تخصيص وغفيليس الخاص بك" .

لماذا الدلائل الوصول إلى العمل إلا عندما تتضمن زائدة "/" (على سبيل المثال، http://foo.domain.com/ ~ / المستخدم) ولكن ليس عندما حذفت منه (على سبيل المثال، http://foo.domain.com/ ~ عَضّوِ)؟

عند الوصول إلى الدليل من دون "/" زائدة، أباتشي بحاجة إلى إرسال ما يسمى إعادة توجيه إلى العميل ليقولوا ذلك لإضافة خط مائل زائدة. اذا لم تفعل ذلك، فإن عناوين URL النسبية لا تعمل بشكل صحيح. عندما يرسل إعادة توجيه، فإنه يحتاج إلى معرفة اسم الملقم بحيث يمكن إدراجه في إعادة توجيه. هناك طريقتان للاباتشي لمعرفة ذلك، فإما أنه يمكن تخمين، أو يمكن أن أقول لكم ذلك. إذا تم تكوين DNS بشكل صحيح، فإنه يمكن تخمين عادة من دون أي مشاكل. إذا لم يكن، مع ذلك، فأنت بحاجة لمعرفة ما.

إضافة الخادم التوجيه إلى ملف التكوين ليقولوا ذلك ما اسم المجال من الملقم.

الشيء الآخر الذي يمكن أن يسبب أحيانا هذا العرض هو سوء فهم من Alias ​​التوجيهي، مما أدى إلى اسم مستعار العمل بخط مائل زائدة، وليس من دون واحدة. Alias ​​التوجيهي حرفية جدا، والأسماء المستعارة ما كنت اقول له. النظر في المثال التالي:

الاسم المستعار / المثال / / الوطن / على شبكة الاتصالات العالمية / المثال /
التوجيه يخلق فوق اسم مستعار لعناوين المواقع التي تبدأ ب / المثال /، ولكن لا اسم مستعار عناوين المواقع بدءا من / سبيل المثال. وهذا يعني، عنوان URL مثل http://servername.com/example/ ستحصل على المحتوى المطلوب، ولكن URL مثل http://servername.com/example سوف يؤدي إلى خطأ "الملف غير موجود".

الاسم المستعار التالية، من ناحية أخرى، سوف تعمل لكلتا الحالتين:

الاسم المستعار / المثال / الوطن / على شبكة الاتصالات العالمية / مثال
لماذا لا تسرد mod_info أي توجيهات؟

وحدة mod_info يتيح لك استخدام مستعرض ويب لمعرفة كيفية تكوين الخادم الخاص بك. من بين المعلومات التي تعرض لائحة وحدات وتوجهاتها التكوين. "التيار" القيم لتوجيهات ليست بالضرورة تلك التي من الخادم الذي يقوم بتشغيل، يتم استخراج هم من ملفات التكوين أنِفَسٌ هم في ذلك الوقت من هذا الطلب. إذا تم تغيير الملفات منذ أن تم شحنها مشاركة الخادم، والعرض لا تتطابق مع القيم بنشاط في الاستخدام. إذا كانت الملفات والمسار إلى ملفات ليست للقراءة من قبل المستخدم والذي كان الملقم قيد التشغيل (انظر توجيه المستخدم)، ثم يمكن mod_info لم يقرأ لهم من أجل إدراج قيمها. وسوف تتاح إدخال في سجل خطأ في هذا الحدث، ولكن.

يتم تجاهل بلدي. ملفات هتكس.

هذا هو دائما تقريبا بسبب الخاص AllowOverride التوجيه التي يجري وضعها بشكل غير صحيح عن الدليل في المسألة. وإذا تم تعيينها إلى لا شيء بعد ذلك. لا ملفات تاكيس حتى يتم النظر ل. هذا أمر جيد. إذا كان لديك الوصول إلى تحرير httpd.conf و، يجب عدم استخدام الملفات. تاكيس، من أي وقت مضى. إذا كان الزبائن بحاجة لدعم تاكيس، تأكد من أن AllowOverride يتم تعيين إلى شيء معقول (أي: لم يكن كلها).أن تكون على يقين أنه يغطي الدليل الذي تحاول استخدام ملف htaccess. فيها ويتم إنجاز هذا عادة عن طريق ضمان فمن داخل الحاوية الدليل الصحيح.

يمكنك معرفة ما إذا كان هذا هو المشكلة عن طريق إضافة نص هراء إلى ملف htaccess الخاص بك. وإعادة تحميل الصفحة. إذا كنت لا تحصل على خطأ في الخادم، ثم اباتشي HTTPD لم يتم قراءة ملف htaccess الخاص بك.

لماذا أحصل على "المحرمة" الرسالة كلما أحاول الوصول إلى دليل معين؟

ويتسبب عادة هذه الرسالة لأنه إما

نظام الملفات الأساسية أذونات لا تسمح للمستخدم / مجموعة تحت أباتشي التي يعمل للوصول إلى الملفات الضرورية، أو
تكوين أباتشي لديها بعض القيود المفروضة على الوصول في المكان الذي يمنع الوصول إلى الملفات.
يمكنك تحديد هذه الحالة تنطبق على الوضع الخاص بك عن طريق التحقق من سجل خطأ.

في الحالة التي يكون فيها ملف إذن النظام هي على خطأ، انظر (13) الإذن مرفوض لمزيد من المعلومات.

لماذا ملفاتي تظهر بشكل صحيح في Internet Explorer، ولكن كما تظهر مصدر أو يؤدي الى نافذة الحفظ مع نتسكيب، أو، لماذا لا إنترنت إكسبلورر تجعل النص الخاص بي / وثيقة واضحة بشكل صحيح؟

مرض التصلب العصبي المتعدد إنترنت إكسبلورر (MSIE) ونتسكيب التعامل مع الكشف عن نوع MIME بطرق مختلفة، وبالتالي سيتم عرض هذه الوثيقة بشكل مختلف. على وجه الخصوص، أي يعتمد أحيانا على امتداد الملف أو محتويات الملف لتحديد نوع MIME. وهذا يمكن أن يحدث عندما يكون الملقم يحدد نوع MIME التطبيق / الثماني، تيار أو النص / عادي. هذا السلوك يشكل انتهاكا لمعيار HTTP ويجعل من المستحيل لتسليم وثائق نص عادي إلى MSIE العملاء في بعض الحالات. مزيد من التفاصيل متاحة على MSIE في نوع MIME سلوك كشف في مقال MSDN ومذكرة من قبل آلان ج. فلافيل.

أفضل يمكنك القيام به كمسؤول خادم لتكوين بدقة نوع MIME من المستندات الخاصة بك عن طريق تحرير ملف mime.types أو باستخدام AddType التوجيه في ملفات التكوين أباتشي. في بعض الحالات، قد تكون قادرة على خداع MSIE إلى تقديم النص / وثائق واضحة بشكل صحيح عن طريق ضمان لديهم ملف TXT. تمديد، ولكن هذا لن ينجح إذا MSIE يعتقد أن محتوى يبدو وكأنه نوع ملف آخر.

موقعي هو الوصول تحت أسماء المضيفين كثيرة مختلفة، وكيف يمكنني توجيه العملاء، بحيث ترى سوى اسم واحد؟

كثير من المواقع تعيين مجموعة متنوعة من أسماء المضيفين إلى نفس المضمون. على سبيل المثال، قد www.example.com، example.com وwww.example.net تشير جميعها إلى نِفَسٌ الموقع. فمن الأفضل للتأكد من أنه، بغض النظر عن اسم استخدام العملاء للوصول إلى الموقع، وسيتم توجيهها إلى اسم المضيف، واحدة الكنسي. هذا يجعل الموقع أسهل للحفاظ على ويؤكد أنه سيكون هناك إصدار واحد فقط من موقع في مخابئ وكيل ومحركات البحث.

هناك نوعان من التقنيات لتنفيذ أسماء المضيفين الكنسي:

استخدام mod_rewrite كما هو موضح في "الكنسي أسماء مضيفين" من دليل إعادة كتابة عنوان.

انظر http://httpd.apache.org/docs/current/rewrite/rewrite_guide.html # canonicalurl .

استخدم اسم القائم على استضافة الظاهري:

NameVirtualHost *: 80
<VirtualHost *:80>
الخادم www.example.net
ServerAlias ​​example.com
إعادة توجيه دائم / http://www.example.com/
</ VirtualHost>

<VirtualHost *:80>
www.example.com الخادم
DocumentRoot / البيرة / المحلية / اباتشى / htdocs
</ VirtualHost>
لماذا يمكنني الوصول إلى موقع الويب الخاص بي من الملقم أو من شبكة الاتصال المحلية، ولكن أنا لا يمكن الوصول إليه من أي مكان آخر على شبكة الإنترنت؟

هناك العديد من الأسباب المحتملة لهذا، وتقريبا وترتبط كل منها لتكوين الشبكة الخاصة بك، وليس تكوين خادم HTTP أباتشي. واحدة من المشاكل الأكثر شيوعا هو أن جدار الحماية بحظر الوصول إلى الافتراضي HTTP المنفذ 80. على وجه الخصوص، مزودي خدمات الإنترنت المستهلك العديد من منع الوصول إلى هذا المنفذ. يمكنك معرفة ما إذا كان هذا هو الحال من خلال تغيير أي ميناء واستمع توجيهات في httpd.conf و لاستخدام المنفذ 8000 ومن ثم طلب موقع الخاص http://yourhost.example.com:8000/ . (وبطبيعة الحال، قد جدار حماية تقييدية جدا منع هذا المنفذ كذلك.)

كيف يمكنني تشغيل قوائم الدليل التلقائي أو إيقاف تشغيله؟

إذا طلب العميل URL الذي يعين الدليل والدليل لا يحتوي على اسم الملف الذي يطابق DirectoryIndex التوجيه، ومن ثم يمكن تكوين mod_autoindex لتقديم قائمة من محتويات الدليل.

لتشغيل دليل الفهرسة الآلية، والعثور على توجيه الخيارات التي تنطبق على الدليل وإضافة الكلمة فهارس. على سبيل المثال:

<Directory /path/to/directory>
خيارات + فهارس
</ دليل>
لإيقاف تلقائي الفهرسة الدليل، وإزالة الكلمة فهارس من سطر الخيارات المناسبة. لإيقاف سرد الدليل للحصول على دليل فرعي معين، يمكنك استخدام خيارات، فهارس. على سبيل المثال:

/path/to/directory> <Directory
خيارات، فهارس
لماذا بلادي خيارات توجيهات لا يكون لها الأثر المطلوب؟

وتطبق التوجيهات وضعت في ملفات التكوين في ترتيب معين للغاية، كما وصفها كيف عمل أقسام دليل، الموقع، والملفات . وبالإضافة إلى ذلك، فإن كل الخيارات التوجيه له تأثير إعادة الخيارات مقابل لا شيء قبل إضافة خيارات معينة (ما لم يكن فقط "+" و "-" تستخدم الخيارات). والنتيجة هي أن الخيارات المحددة في الخادم الرئيسي أو الظاهرية السياق المضيف (خارج أي دليل، والمكان، أو قسم الملفات) وعادة ما يكون له تأثير، لأنها تجاوز أكثر التوجيهات خيارات محددة. على سبيل المثال، في ما يلي


/usr/local/apache/htdocs> <Directory
خيارات فهارس
خيارات تشمل ExecCGI
ويتضمن ExecCGI ستكون ثماره في البيرة / / المحلية / اباتشى / htdocs الدليل.

يمكنك تجنب المشاكل من خلال ايجاد عادة إما توجيه الخيارات التي تنطبق بالفعل على دليل محدد وتغييرها، أو عن طريق وضع الخاص بك خيارات التوجيه داخل القسم <Directory> ممكن الأكثر تحديدا.

كيف يمكنني تغيير المعلومات التي أباتشي الإسترجاع عن نِفَسٌ ها في رؤوس؟

عندما يتصل عميل إلى أباتشي، وهي جزء من المعلومات التي تم إرجاعها في رؤوس هو اسم "اباتشي" للمزيد من المعلومات التي يمكن إرسالها هو رقم الإصدار، مثل "2.2.17"، نظام التشغيل، وقائمة غير الوحدات القياسية التي قمت بتثبيتها.

على سبيل المثال:

الخادم: Apache/2.2.17 (يونيكس) mod_perl/1.26 في كثير من الأحيان، الناس يريدون إزالة هذه المعلومات، في ظل فهم خاطئ أن يؤدي ذلك إلى جعل النظام أكثر أمانا. وربما هذا هو ليس كذلك، كما من المرجح أن يستغل نِفَسٌ ه يكون حاول بغض النظر عن المعلومات التي توفرها رأس.

هناك، ومع ذلك، واثنين من الاجابات على هذا السؤال: الجواب الصحيح، والجواب الذي كنت تبحث على الأرجح ل.

الإجابة الصحيحة على هذا السؤال هو أنه يجب عليك استخدام ServerTokens التوجيه لتغيير كمية المعلومات التي يتم تمريرها في رؤوس. وسوف يحدد هذا التوجيه لحث تمرير كمية أقل قدر ممكن من المعلومات:

الخادم: أباتشي الجواب ربما كنت تبحث عنه هو كيفية جعل أباتشي يكذب بشأن ما ما هو عليه، أي إرسال شيء من هذا القبيل:

الخادم: خادم بوب HTTPD سعيد من أجل القيام بذلك، سوف تحتاج إلى تعديل التعليمات البرمجية المصدر أباتشي وإعادة بناء أباتشي. لا ينصح بذلك، لأنه بات من شبه المؤكد أن لا توفر لك الأمن وأضاف كنت تعتقد أنك تكتسب. يتم ترك بالضبط طريقة للقيام بذلك باعتبارها ممارسة للقارئ، كما أننا لسنا حريصين على مساعدتك في القيام بشيء ما هي في جوهرها فكرة سيئة.

لماذا أرى طلبات للحصول على المواقع الأخرى التي تظهر في ملفات السجل الخاص بي؟

ويمكن إدخال access_log تظهر هذه الحالة تبدو مثل هذا:

63.251.56.142 - [25/Jul/2002: 00:48:04 -0700] "GET http://www.yahoo.com/ HTTP/1.0 "200 1456والسؤال هو: لماذا طلب www.yahoo.com تأتي إلى الخادم الخاص بك بدلا من خادم ياهو؟ ولماذا يكون الرد على رمز حالة 200 (النجاح)؟

هذا هو عادة نتيجة للعملاء محاولة خبيثة لاستغلال خوادم بروكسي مفتوحة للوصول إلى موقع على شبكة الانترنت دون الكشف عن مواقعها الحقيقية. إذا وجدت مثل هذه القيود في السجل الخاص بك، فإن أول شيء فعله هو التأكد من انك صحيح تكوين الخادم الخاص بك ليس إلى وكيل لعملاء غير معروف. إذا كنت لا تحتاج إلى توفير خادم وكيل في كل شيء، يجب أن أؤكد ببساطة أن ProxyRequests لم يتم تعيين التوجيه في. إذا كنت لا تحتاج إلى تشغيل ملقم وكيل، ثم يجب عليك التأكد من الحصول على الخادم الخاص بك بشكل صحيح بحيث عملاء المخولين فقط يمكن استخدامها.

إذا تم تكوين الخادم الخاص بك بشكل صحيح، ثم محاولة من خلال وكيل الخادم الخاص بك فشل. إذا كنت ترى رمز حالة من 404 (لم يتم العثور على ملف) في السجل، ثم أنت تعلم أن فشل الطلب. إذا كنت ترى رمز الحالة 200 (نجاح)، وهذا لا يعني بالضرورة أن محاولة الوكيل نجحت. RFC2616 قسم 5.1.2 ولذلك يجب ان تقبل طلبات اباتشي مع عناوين المواقع المطلقة في URI-الطلب، حتى بالنسبة لغير الوكيل الطلبات. منذ أباتشي لا يوجد لديه طريقة لمعرفة جميع الأسماء المختلفة التي قد تكون معروفة خادم تحت، فإنه لا يمكن رفض ببساطة أسماء مضيفين أنها لا تعترف. بدلا من ذلك، وسوف تخدم طلبات للحصول على مواقع غير معروف محليا من ملابسه واستخدام اسم المضيف الملقم الافتراضي أو المضيف الظاهري. لذلك يمكنك مقارنة حجم الملف (1456 في المثال أعلاه) إلى حجم ملف المناظرة في الملقم الافتراضي الخاص بك. إذا كانت هي نِفَسٌ ها، ثم محاولة الوكيل فشلت، منذ أن تم تسليم وثيقة من الخادم الخاص بك، وليس وثيقة من www.yahoo.com.

إذا كنت ترغب في منع هذا النوع من الطلب تماما، فأنت بحاجة للسماح للأباتشي معرفة ما أسماء المضيفين لقبول ورفض ما أسماء المضيفين. يمكنك القيام بذلك عن طريق تكوين المضيفين الاسم الظاهري، حيث تستضيف الأولى المذكورة هو المضيف الافتراضي الذي سوف الصيد ورفض أسماء المضيفين غير معروف. على سبيل المثال:


NameVirtualHost *: 80

<VirtualHost *:80>
default.only الخادم
<Location />
طلب السماح، ورفض
كل من رفض
</ الموقع>
</ VirtualHost>

<VirtualHost *:80>
الخادم realhost1.example.com
alias1.example ServerAlias. كوم alias2.example.com
DocumentRoot / path/to/site1
</ VirtualHost>
...
واو المحتوى الديناميكي (CGI، ومباحث أمن الدولة)

كيف يمكنني تمكين تنفيذ CGI في الدلائل الأخرى من ScriptAlias؟

أباتشي تسلم جميع الملفات في دليل اسمه باعتباره scriptalias التي كونها مؤهلة للتنفيذ بدلا من تجهيز وثائق عادية. وينطبق هذا بغض النظر عن اسم الملف، لذلك مخطوطات في scriptalias التي لا تحتاج إلى دليل الكشف عن اسمه "*. CGI" أو "*. رر" أو أيا كان. وبعبارة أخرى، كافة الملفات في scriptalias التي هي دليل النصوص، بقدر ما تشعر بالقلق أباتشي.

لإقناع أباتشي لتنفيذ البرامج النصية في مواقع أخرى، مثل في الدلائل حيث الوثائق العادية قد يعيش أيضا، يجب أن يقولوا ذلك كيفية التعرف عليهم - وأيضا على أنه لا بأس من تنفيذها. لهذا، تحتاج إلى استخدام ما يشبه AddHandler التوجيه.

في القسم المناسب من الملفات تكوين الملقم، إضافة خط مثل AddHandler CGI-النصي. CGIسيقوم الملقم ثم تعترف أن جميع الملفات الموجودة في هذا الموقع (وتنحدر منها المنطقية) التي تنتهي في. "CGI" هي ملفات البرنامج النصي، وليس وثائق.

تأكد من أن يتم تغطيتها من قبل موقع الدليل إعلانا الخيارات التي تتضمن خيار ExecCGI. في بعض الحالات، قد لا ترغب في السماح فعلا جميع الملفات المسماة "*. CGI" لتكون قابلة للتنفيذ. ربما كل ما تريد هو تمكين ملف معين في دليل الطبيعي أن تكون قابلة للتنفيذ. ويمكن إنجاز هذا بدلا من ذلك عن طريق mod_rewrite والخطوات التالية:

إضافة محليا إلى ملف htaccess المقابلة من مجموعة الأوامر مشابهة لهذه واحدة.:

RewriteEngine على
RewriteBase ~ / فو / شريط /
. RewriteRule ^ quux \ CGI $ - [T = التطبيق / x-هتبد-CGI]
تأكد من أن يتم تغطيتها من قبل موقع الدليل إعلانا الخيارات التي تتضمن ExecCGI و FollowSymLinks خيار.

ماذا يعني عندما سى جي آي إس بي تفشل مع "من السابق لأوانه نهاية رؤوس السيناريو"؟

هذا يعني فقط ما تقول: خادم كانت تتوقع مجموعة كاملة من رؤوس HTTP (واحد أو أكثر متبوعا سطر فارغ)، ولم يحصل عليها.

السبب الأكثر شيوعا لهذه المشكلة هو البرنامج النصي يموتون قبل إرسال مجموعة كاملة من رؤوس، أو ربما أي في كل شيء، إلى الخادم. لنرى ما اذا كان هذا هو الحال، حاول تشغيل مستقل النصي من جلسة تفاعلية، بدلا من أن يكون السيناريو ضمن الملقم. اذا كان لديك رسائل الخطأ، وهذا يكاد يكون من المؤكد ان سبب "نهاية مبكرة من رؤوس النصي" رسالة. حتى لو كان CGI يعمل غرامة من سطر الأوامر، تذكر أن البيئة وأذونات قد تكون مختلفة عندما تعمل تحت خادم الويب. يمكن فقط الوصول إلى موارد CGI يسمح للمستخدم ومجموعة المحدد في التكوين الخاص بك اباتشي. وبالإضافة إلى ذلك، فإن البيئة لا يكون هو نِفَسٌ ه واحد
الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: رد: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:27 am


ما هو اباتشي؟

وأباتشي خادم HTTP

هو ومرنة قوية، وشبكة متوافقة مع HTTP/1.1 خادم
تطبق على أحدث البروتوكولات، بما في ذلك HTTP/1.1 (RFC2616)
هو شكلي للغاية وقابلة للتوسيع مع طرف ثالث وحدات
يمكن تخصيصها من خلال كتابة "وحدات" باستخدام وحدة اباتشي API
يقدم كامل شفرة المصدر ويأتي مع رخصة مقيد
يعمل على ويندوز 2000، 5.X Netware و أعلاه، OS / 2، ومعظم إصدارات يونيكس، فضلا عن العديد من أنظمة التشغيل الأخرى
وبنشاط التي يجري تطويرها
تشجع ردود الفعل المستخدم من خلال أفكار جديدة، والتقارير الشوائب والبقع
وتنفذ العديد من الميزات المطلوبة بشكل متكرر، بما في ذلك:
DBM قواعد البيانات كذلك، وقواعد البيانات العلائقية وLDAP للمصادقة
يسمح لك بسهولة انشاء محمية بكلمة مرور صفحات مع أعداد هائلة من المستخدمين المصرح لهم، دون التعثر بانخفاض الخادم.
مخصصة الردود على الأخطاء والمشكلات
يسمح لك إعداد الملفات، أو حتى نصوص CGI، والتي يتم إرجاعها من قبل الملقم استجابة للأخطاء والمشاكل، على سبيل المثال إعداد سيناريو لاعتراض أخطاء خادم 500 ونفذ على رأس ذبابة التشخيص لكل من المستخدمين ونِفَسٌ ك.
متعددة DirectoryIndex توجيهات - يسمح لك لنقول DirectoryIndex index.html وindex.cgi، الذي يرشد الخادم لإرسال index.html وإما العودة أو تشغيل index.cgi عند طلب URL الدليل، أيهما يجدها في الدليل.
URL مرن غير محدود اعادة كتابة والتعرج - أباتشي ليس له حدود ثابتة على عدد من الأسماء المستعارة والموجهات التي قد تعلن في ملفات التكوين. وبالإضافة إلى ذلك، يمكن استخدام محرك قوي إعادة كتابة إلى حل معظم المشاكل تلاعب URL.
التفاوض محتوى - أي القدرة على خدمة العملاء تلقائيا متفاوتة التطور وHTML مستوى الامتثال، مع الوثائق التي تقدم أفضل تمثيل من المعلومات التي تفيد بأن العميل قادر على الموافقة.
المضيفين الظاهري - يسمح الملقم للتمييز بين الطلبات التي قدمت إلى عناوين IP مختلفة أو أسماء (تعيينها إلى نِفَسٌ الجهاز). أباتشي كما يقدم شكلي حيوي الشامل استضافة الظاهري.
شكلي موثوق سجلات الأنابيب - يمكنك تكوين أباتشي لتوليد سجلات في الشكل الذي تريده. ضرب وبالإضافة إلى ذلك، في معظم أبنية يونيكس، أباتشي يمكن أن ترسل ملفات السجل إلى أنبوب، والسماح لتناوب السجل، والترشيح، في الوقت الحقيقي من تقسيم vhosts متعددة في سجلات منفصلة، ​​وغير المتزامن حل DNS على الطاير.
كيف ولماذا تم إنشاء أباتشي HTTP خادم؟

في وثيقة أباتشي حول ما يفسر كيف أن مشروع أباتشي تطورت من بداياتها وذلك امتدادا للمشروع هتبد NCSA إلى وضعه الحالي واحدة من أسرع وخوادم الويب الأكثر كفاءة، وظيفية أكثر في وجود.

لماذا اسم "أباتشي"؟

وقد تم اختيار "أباتشي" على اسم من الاحترام لقبيلة الهنود الأميركيين الأصليين من نوع اباتشي (INDE)، معروف جيدا لمهاراتهم الفائقة في استراتيجية الحرب وقدرتهم على التحمل لا ينضب. لمزيد من المعلومات عن الأمة أباتشي، نقترح البحث غوغل، أو روابط إلى .

ثانوي، وأكثر من ذلك شعبيا (على الرغم من بشكل غير صحيح) وقبلت، انها اسم لطيف النظر الذي تمسك. اباتشي هو "ملقم غير مكتمل". كان هذا بناء على بعض التعليمات البرمجية الموجودة، وسلسلة من "ملفات التصحيح".

هذه أباتشي أيام على هذا النحو يعني أكثر من ذلك بكثير. إنها أولا وقبل كل شيء مؤسسة البرمجيات أباتشي، والتي بموجبها هناك العشرات من المشاريع.

كيف يمكن للاباتشي HTTPD أداء مقارنة إلى خوادم أخرى؟

المعايير تميل الى ان تكون على قدر من competance التكوين، بدلا من جودة الخدمة. وهذا هو، إذا كنت خبيرا في IIS، يمكنك الحصول على الأرجح ليتم تشغيله بشكل أسرع من التي يمكنك الحصول عليها لتشغيل أباتشي. يمكنك أن تجد لذلك comparisions من ملقمات HTTP المختلفة التي تثبت أن كل أسرع من كل الآخرين. ونحن نميل إلى اتخاذ معايير أداء الخادم مع حبة الملح.

كيف اختباره هو اباتشي HTTPD؟

يتم تشغيل اباتشي على خوادم الإنترنت أكثر من 120 مليون دينار (اعتبارا من أبريل 2010) (المصدر، نيتكرافت ). وقد تم اختباره بشكل دقيق من قبل كل من المطورين والمستخدمين. مشروع أباتشي خادم HTTP إدارة اللجنة على معايير صارمة قبل إطلاق إصدارات جديدة من الخادم الخاص بهم، والخادم يعمل دون وجود عوائق على أكثر من نصف من كافة ملقمات WWW المتوفرة على شبكة الإنترنت. عندما البق لا تظهر، ونحن الافراج عن بقع والإصدارات الجديدة حالما تصبح متاحة.

ما هي الخطط المستقبلية لهتبد أباتشي؟

إلى الاستمرار في القيام بدور "المصادر المفتوحة" وبدون تكلفة مقابل استخدام HTTP خادم،
لمواكبة التطورات في بروتوكول HTTP والتطورات على شبكة الإنترنت بشكل عام،
لجمع مقترحات لإصلاحات / تحسينات من مستخدميها،
للاستجابة لاحتياجات مقدمي حجم كبير وكذلك المستخدمين في بعض الأحيان.
الذي يمكنني الاتصال به للحصول على الدعم؟

انظر http://httpd.apache.org/support.html .

هل هناك أي مزيد من المعلومات المتاحة عن اباتشي httpd؟

في الواقع هناك. راجع موقع الويب Apache الرئيسي الخادم . وهناك أيضا العديد من الكتب حول الملقم HTTP أباتشي المتاحة.

أين يمكنني الحصول على هتبد أباتشي؟

يمكنك معرفة كيفية تحميل مصدر للأباتشي في موقع رئيسي أباتشي خادم الويب .

أين يمكنني تحميل (مصدقة) 64 اباتشي httpd ثنائيات بت لنظام التشغيل Windows؟

في الوقت الراهن، لا يوجد أحد. وتنتج المؤسسة برامج أباتشي مفتوحة المصدر البرامج. الثنائيات 32 بت المقدمة هي من باب المجاملة لأفراد المجتمع.

اسمحوا لي أن استخدام شعار اباتشي على المنتج الخاص بي أو موقع ويب؟

لا يجوز لك استخدام أي العمل الفني الأصلي من مؤسسة البرمجيات أباتشي، ولا تقديم، أو استخدام نسخ معدلة من هذه الأعمال الفنية، إلا وفقا للشروط في سياسة أباتشي العلامات التجارية الوثيقة.

B. العام أسئلة فنية

"لماذا لا أستطيع ...؟ لماذا لا ... العمل؟" ما يجب القيام به في حالة حدوث مشاكل

إذا كنت تواجه مشكلة مع برنامج خادم أباتشي، يجب اتخاذ الخطوات التالية:

التحقق من errorlog!
أباتشي يحاول أن يكون مفيدا عندما يواجه مشكلة. في كثير من الحالات، فإنه سيتم تقديم بعض التفاصيل عن طريق كتابة واحد أو رسائل إلى خادم سجل خطأ. أحيانا هذا يكفي بالنسبة لك لتشخيص وعلاج هذه المشكلة نِفَسٌ ك (مثل أذونات الملف أو ما شابه ذلك). الموقع الافتراضي لسجل الخطأ هو / البيرة / المحلية / اباتشى / السجلات / error_log، لكنهم يرون أن ErrorLog التوجيه في ملفات التكوين لموقع على الخادم الخاص بك.
التحقق من التعليمات!
كنت بالفعل هنا.
فحص قاعدة البيانات الخطأ أباتشي
وتسجل معظم المشاكل التي تحصل أبلغ بها الفريق اباتشي في قاعدة البيانات الخطأ. يرجى الاطلاع على التقارير الموجودة، مفتوحة ومغلقة، قبل أن يضيف واحدة. إذا وجدت أنه تم بالفعل مشكلتك ذكرت، من فضلك لا تضيف "أنا أيضا" تقرير. إذا لم يتم إغلاق التقرير الأصلي حتى الآن، ونحن نقترح عليك مراجعة بشكل دوري. هل يمكن أن تنظر أيضا الاتصال المرسل الأصلي، لأنه قد يكون هناك تبادل الكتروني يدور حول هذه القضية التي لم يتم الحصول على تسجيلها في قاعدة البيانات.
نسأل مستخدم في فريق الدعم
وهناك الكثير من المشاكل المشتركة لا يصل الى قاعدة البيانات الخطأ لأنه لا يوجد بالفعل سؤال وجواب ارتفاع حركة المرور حول لهم في القائمة البريدية للمستخدمين أو comp.infosystems.www.servers.unix ومجموعات الأخبار ذات الصلة. هذه الأخبار هي أيضا متوفرة عبر غوغل. ويمكن الاطلاع على العديد من المستخدمين أباتشي، وبعض من المطورين، والتجوال بقاعاتها الظاهري، لذلك يقترح أن كنت تسعى حكمة هناك. وهناك احتمالات جيدة لأنك سوف تحصل على الجواب أسرع من هناك من قاعدة البيانات الخطأ، حتى لو كنت لا ترى سؤالك نشرت بالفعل.
إذا فشل كل شيء آخر، تقريرا عن مشكلة في قاعدة البيانات الخطأ
إذا كنت قد ذهبت من خلال تلك الخطوات المذكورة أعلاه أن تكون مناسبة وأن يتم الحصول على أي الإغاثة، ثم الرجاء ترك الفريق أباتشي تعرف عن هذه المشكلة من خلال تسجيل تقرير الخطأ.
إذا كانت المشكلة تنطوي على خادم تحطمها وتوليد تفريغ الأساسية، يرجى تشمل التتبع المعاكس (إن أمكن). كمثال على ذلك،

# مؤتمر نزع السلاح ServerRoot
هتبد DBX # الأساسية
(DBX) حيث
(البديل المواقع المناسبة لجهودكم ServerRoot وهتبد والملفات الأساسية. قد تضطر إلى استخدام GDB بدلا من DBX).

كيف يمكنني تقديم تصحيحا لهتبد أباتشي؟

ويمكن الاطلاع على معلومات مفصلة عن تقديم التقارير الشوائب والبقع في وثائق HTTP أباتشي خادم المطور .

لماذا سرقت أباتشي عنوان موقعي المفضل على الانترنت؟

الجواب بسيط هو: "من لم يفعل ذلك." وعادة ما تسبب هذا المفهوم الخاطئ من موقع في السؤال بعد أن هاجر إلى خادم أباتشي برامج الانترنت، ولكن ليس بعد أن هاجر محتوى الموقع حتى الآن. عندما يتم تثبيت أباتشي، الصفحة الافتراضية أن يحصل على تثبيت يقول مسؤول الموقع إلى نجاح عملية التثبيت. التوقع هو أنه سيتم استبدال هذه الصفحة الافتراضية مع محتوى الموقع الحقيقي. إذا لم يحدث ذلك، يشكو مسؤول الموقع، وليس إلى مشروع أباتشي - نحن فقط جعل البرنامج وغير مسؤولة عن ما يفعله الناس (أو لا تفعل) معها.

لماذا أحصل على البريد المزعج من موقع أباتشي؟

الجواب القصير هو: "أنت لا." عادة عندما يقوم شخص ما يعتقد أن موقع أباتشي ينشأ الرسائل غير المرغوب فيها، فذلك لأنها قد تتبع الرسائل غير المرغوب فيها إلى موقع ويب، وموقع ويب تقول انها تستخدم أباتشي. راجع إدخال التعليمات السابقة لمزيد من التفاصيل حول هذه الظاهرة.

لا البريد المزعج تسويق تنبع من موقع أباتشي. البريد الوحيد الذي يأتي من موقع يذهب فقط إلى عناوين التي تم طلبها لتلقي البريد.

أنا قد تشمل البرمجيات أباتشي على قرص مضغوط أو حزمة أخرى أنا توزيع؟

يمكن العثور على إجابة مفصلة على هذا السؤال في رخصة أباتشي، والتي يتم تضمينها في توزيع اباتشي في ملف الترخيص. يمكنك أن تجد أيضا على شبكة الإنترنت في http://www.apache.org/licenses/ .

ما هو أفضل الأجهزة / نظام التشغيل / ... كيف يمكنني الحصول على أقصى استفادة من خدمة بلدي الويب اباتشي؟

اطلع على صفحة ضبط الأداء .

ما هي "التعابير العادية"؟

التعابير العادية هي طريقة لوصف نمط - على سبيل المثال، "كل الكلمات التي تبدأ بحرف A" أو "كل رقم الهاتف 10 مكونة" أو حتى "في كل جملة مع اثنين من الفواصل في ذلك، وليس رأس المال س حرف" . التعابير العادية (ويعرف أيضا باسم "رجإكس" ليالي) مفيدة في أباتشي لأنها تتيح لك تطبيق سمات معينة ضد مجموعات من الملفات أو الموارد في طرق مرنة للغاية - على سبيل المثال، جميع ملفات GIF و JPG تحت أي دليل "صور" يمكن أن تكون مكتوبة. كما / صور / *. (JPG | GIF) $ . لاحظ أن هتبد ليست بحاجة الى ترسيم / / وذلك لتجنب "المسواك" عند مطابقة أو محددات المسارات، مثل: ؟ / \ / فو \ / شريط \ / /

أفضل نظرة عامة حول هو على الارجح احد والتي تأتي مع بيرل . تعبيرات أباتشي العادية استخدام PCRE - بيرل التعبير العادية متوافق .

لماذا لا يكون هناك ثنائي لبرنامجي؟

للمطورين تأكد من أن البرنامج يبني ويعمل بشكل صحيح على الأنظمة الأساسية المتاحة لهم، وهذا لا يعني بالضرورة أن النظام الأساسي الخاص بك هو واحد منهم. وبالإضافة إلى ذلك، ملقم HTTP أباتشي المشروع هو في المقام الأول مصدر المنحى، وهذا يعني أن توزيع سارية المفعول ويمكن البناء عليها شفرة المصدر هو الغرض من بيان، وليس التأكد من أن هناك حزمة ثنائي لجميع الأنظمة الأساسية المعتمدة.

إذا كنت لا نرى ان هناك عدة عن النظام الأساسي الخاص بك المدرجة في مجال التوزيع ثنائي ( http://httpd.apache.org/dist/httpd/binaries/ )، فهذا يعني إما أن النظام الأساسي لا تتوفر على أي من للمطورين، أو أنها فقط لم نصل في جميع أنحاء لإعداد ثنائي لذلك. لأن هذا هو مشروع طوعي، فهي ليست ملزمة للقيام بذلك. ويتم تشجيع المستخدمين، ومن المتوقع أن بناء البرمجيات أنِفَسٌ هم.

الاستثناء الوحيد لهذه الممارسات هو حزمة ويندوز. وخلافا لمعظم منصات يونيكس ويونيكس مثل، أنظمة ويندوز لا تأتي مع بيئة تطوير البرمجيات المجمعة، لذلك نحن لا تعد مجموعات ثنائي لنظام التشغيل Windows عندما نتخذ بيان. مرة أخرى، ومع ذلك، فإنه أمر طوعي، وسوى عدد محدود من المطورين لديها القدرة على بناء InstallShield حزمة، وبالتالي فإن إطلاق ويندوز قد تأخر بعض الشيء وراء الافراج عن المصدر. وينبغي أن يكون هذا الفارق ليس أكثر من بضعة أيام على الأكثر.

جيم هتبد مبنى أباتشي

لماذا أحصل على خطأ عن مرجع غير معروف "ل__inet_ntoa" أو غيرها من الرموز inet_ __ *؟

إذا كنت قد قمت بتثبيت BIND-8 ثم وهذا هو عادة بسبب وجود صراع بين الملفات وتشمل والمكتبات الخاصة بك. BIND-8 يثبت لها وتشمل الملفات والمكتبات / البيرة / المحلية / وتشمل / و / البيرة / المحلية / ليب /، في حين تم تثبيت ربما محلل الذي يأتي مع النظام الخاص بك في / البيرة / وتشمل / و / البيرة / ليب /. إذا كان النظام يستخدم الملفات رأس في / البيرة / المحلية / وتشمل / قبل تلك الموجودة في / البيرة / وتشمل / لكنك لا تستخدم المكتبة محلل جديد، ثم النسختين سوف تتعارض.

لحل هذه المشكلة، يمكنك جعل إما من استخدام وتشمل الملفات والمكتبات التي تأتي مع النظام أو للتأكد من استخدام جديدة تشمل الملفات والمكتبات. مضيفا-lbind إلى خط EXTRA_LDFLAGS في ملف التكوين الخاص بك، ثم إعادة تشغيل تكوين، وينبغي حل هذه المشكلة. (الإصدارات أباتشي 1.2. * وEXTRA_LFLAGS استخدام في وقت سابق بدلا من ذلك.)

ملاحظة: اعتبارا من BIND 8.1.1، يتم تثبيت مكتبات ربط والملفات تحت / البيرة / المحلية / ربط افتراضيا، لذلك يجب أن لا تصل الى هذه المشكلة. وينبغي أن كنت ترغب في استخدام حل له ربط سيكون لديك لإضافة التالية إلى خطوط كل منها:

EXTRA_CFLAGS = -I/usr/local/bind/include EXTRA_LDFLAGS = -L/usr/local/bind/lib EXTRA_LIBS =-lbind

أحصل على خطأ حول "تكوين فشل srclib / أبريل"

هذا لا ينطبق إلا على اباتشي 2.4 و في وقت لاحق

إذا كنت بناء مع الخيار - مع-شمل-APR، تحتاج أيضا إلى تحميل كتل القطران *-deps يطابق الافراج الرئيسية التي تحاول بناء، واستخراج عليه في نِفَسٌ الدليل.

لماذا لا أباتشي ترجمة مع نسخة نظام بلدي؟

إذا كان الملقم لن تجميع على النظام الخاص بك، وربما هو نتيجة لأحد الأسباب التالية:

السيناريو تكوين بيئة لا تعترف النظام الخاص بك.
وهذا قد يكون إما لأنه غير معروف تماما، أو لأنه لم يتم التعامل مع بيئة معينة (وتشمل الملفات، إصدار نظام التشغيل، وهلم جرا) بشكل صريح. إذا حدث هذا، قد تحتاج إلى منفذ الخادم لنظام التشغيل الخاص بك نِفَسٌ ك.
النظام الخاص بك C المترجم هو جمع ونقل النفايات.
بعض أنظمة التشغيل وتشمل مترجم C الافتراضية التي قد تكون غير متوافقة مع ANSI C أو يعاني من أوجه قصور أخرى. التوصية المعتادة في مثل هذه الحالات هو الحصول على وتركيب واستخدام دول مجلس التعاون الخليجي.
قد يتم الخلط بين الخاص بك تتضمن الملفات.
في بعض الحالات، وجدنا أن ترقية أو تثبيت نظام البرمجي قد ترك الملفات رأس C في حالة غير متناسقة. تأكد من أن شجرة الخاص يضم الدليل هو متزامنا مع مترجم ونظام التشغيل.
قد نظام التشغيل الخاص بك أو المترجم أن يكون للخروج من التنقيح.
بائعي البرامج (بما فيها تلك التي تطور أنظمة التشغيل) إصدار نشرات جديدة لسبب ما، وأحيانا لإضافة وظيفة، ولكن في كثير من الأحيان لتصحيح الأخطاء التي تم اكتشافها. محاولة رفع مستوى المترجم الخاص بك و / أو نظام التشغيل الخاص بك.
مجموعة أباتشي اختبارات القدرة على بناء الخادم على منصات مختلفة. لسوء الحظ، لا يمكننا اختبار كل من منصات نظام التشغيل هناك. إذا كنت قد تحققت من أن أيا من القضايا المذكورة أعلاه هو سبب المشكلة، وألا يكون قد ذكرت من قبل، ويرجى تقديم تقرير مشكلة. مما لا شك فيه لتشمل تفاصيل كاملة، مثل المترجم وإصدارات نظام التشغيل ورسائل الخطأ بالضبط.

لماذا أحصل على شكاوى حول إعادة تعريف "iovec البنية" عند ترجمة تحت لينكس؟

هذا هو صراع بين الخاص C مكتبة تضم وتضم النواة. كنت بحاجة للتأكد من أن تتم مطابقة إصدارات على حد سواء بشكل صحيح. هناك نوعان من الحلول، أي واحد سوف تحل المشكلة:

إزالة تعريف iovec البنية من مكتبة C الخاص بك يتضمن. وتقع في / البيرة / وتشمل / SYS / uio.h. أو،على خط EXTRA_CFLAGS في التكوين الخاص بك وإعادة تكوين / اعادة بناء إضافة DNO_WRITEV. هذا يضر الأداء ويجب استخدامه فقط كملاذ أخير.

أنا باستخدام دول مجلس التعاون الخليجي وأحصل على بعض أخطاء ترجمة، ما هو الخطأ؟

دول مجلس التعاون الخليجي بتوزيع الملفات رأس النظام وتنتج مجموعة فرعية تعديل الذي يستخدم لتجميع. هذا السلوك يربط بين دول مجلس التعاون الخليجي بإحكام على إصدار نظام التشغيل الخاص بك. هكذا، على سبيل المثال، إذا كنت تعمل IRIX 5.3 عند بني دول مجلس التعاون الخليجي ومن ثم الترقية إلى IRIX 6،2 في وقت لاحق، وسوف تضطر إلى إعادة بناء دول مجلس التعاون الخليجي. وبالمثل لسولاريس 2.4، 2.5، 2.5.1 أو عند الترقية إلى 2.6. في بعض الأحيان يمكنك كتابة "دول مجلس التعاون الخليجي-V"، وسوف اقول لكم نسخة من نظام التشغيل تم بناؤها ضد.

إذا فشلت في القيام بذلك، فمن المرجح جدا أن أباتشي ستفشل لبناء. أحد الأخطاء الأكثر شيوعا هو مع readv، writev، أو uio.h. هذه ليست علة مع اباتشي. وسوف تحتاج إلى إعادة تثبيت دول مجلس التعاون الخليجي.

رسائل د. سجل خطأ ومشاكل في بدء تشغيل أباتشي

لماذا أحصل على "setgid: الوسيطة غير صالحة" عند بدء التشغيل؟

التوجيه الخاص المجموعة (وربما في أسيوط / httpd.conf و) يحتاج لتسمية مجموعة موجودة فعلا في الملف / الخ / مجموعة (أو ما يعادلها النظام الخاص بك). كما أن هذه المشكلة ينظر في كثير من الأحيان عندما يتم استخدام رقم سالب في توجيه المجموعة (على سبيل المثال، "المجموعة # -1"). باستخدام اسم المجموعة - وليس عدد مجموعة - أن وجدت في قاعدة بيانات مجموعة النظام الخاص بك حل هذه المشكلة في جميع الحالات.

لماذا أحصل على "هتبد: لا يمكن وضع مأخذ TCP_NODELAY خيار" في سجل خطأ الخاص بي؟

هذه الرسالة دائما تقريبا يشير إلى أن العميل قبل قطع أباتشي وصلنا الى نقطة استدعاء setsockopt () للاتصال. فإنه لا ينبغي أن تحدث لأكثر من حوالي 1٪ من الطلبات الخادم يعالج، وانها استشارية فقط على أي حال.

لماذا أحصل على "إعادة الاتصال عن طريق الأقران" في سجل خطأ الخاص بي؟

هذه هي رسالة عادية وشيئا عن الذي ليشعروا بالذعر. وهو ما يعني ببساطة أن العميل إلغاء الاتصال قبل قد وضعتها تماما حتى - مثل من قبل المستخدم النهائي الضغط على "إيقاف" الزر. صبر الشعب يجري ما هو عليه، قد المواقع مع الاستجابة في الوقت مشاكل أو ارتباطات الشبكة بطيئة واجهت هذه أكثر من تلك القدرة العالية أو تلك مع أنابيب كبيرة على الشبكة.

ويقول errorlog أباتشي ملقاة الأساسية، ولكن أين هو ملف تفريغ؟

الرسالة سجل خطأ عن جوهر ملقاة يتضمن الدليل حيث ملف تفريغ يجب أن يكون موجودا. ومع ذلك، Unixes كثيرة لا تسمح للعملية التي ودعت setuid () لتفريغ الأساسية لأسباب أمنية ('هل هذا ما زالت مشكلة؟')؛ الإعداد أباتشي نموذجي لديه خادم بدأت كجذر لربط المنفذ 80، وبعد ذلك ويستخدم setuid () لتغيير UIDs لمستخدم غير المميز لخدمة الطلبات.

التعامل مع هذا النظام يعمل غاية محددة، وربما تتطلب إعادة بناء نواة النظام الخاص بك. راجع وثائق نظام التشغيل الخاص بك أو بائع للحصول على مزيد من المعلومات حول ما إذا كان النظام يفعل ذلك، وكيفية الالتفاف عليها. إذا كان هناك طريقة موثقة لتجاوز ذلك، فمن المستحسن أن يمكنك تجاوز ذلك فقط من أجل عملية HTTPD الخادم إذا كان ذلك ممكنا.

الموقع الكنسي عن الملفات الأساسية تفريغ اباتشي هو ServerRoot الدليل. ويمكن تعيين موقع عبر CoreDumpDirectory التوجيه إلى دليل مختلف. تأكد من أن هذا الدليل غير قابل للكتابة من قبل المستخدم والخادم يعمل على (خلافا للمستخدم بدء تشغيل الخادم كما هو).

عند تشغيل على لينكس أحصل على "shmget: لم يتم العثور على وظيفة"، فماذا أفعل؟

وقد تم بناء النواة من دون دعم IPC SysV. سيكون لديك لإعادة بناء نواة مع أن تمكين دعم (انها تحت عنوان "العام إعداد" قائمة فرعية). وثائق لبناء نواة هي خارج نطاق هذه التعليمات، يجب عليك استشارة HOWTO النواة، أو الوثائق المرفقة مع توزيعتك، أو لينكس قائمة الأخبار / البريدية. كحل أخير، يمكنك تعليق خارج # تعريف تعريف USE_SHMGET_SCOREBOARD في القسم لينكس من SRC / conf.h وإعادة بناء الخادم (قبل 1.3b4، وإزالة ببساطة تعريف # HAVE_SHMGET سيكون كافيا). هذا وسوف تنتج الخادم الذي هو أبطأ وأقل موثوقية.

توقف الخادم، أو فشل بدء، و / أو سجل خطأ يملأ مع "fcntl: F_SETLKW: لا يوجد سجل اقفال المتاحة" الرسائل أو ما شابه ذلك

هذه هي أعراض ملف مشكلة تأمين، والتي عادة ما يعني أن الخادم يحاول استخدام ملف التزامن على نظام الملفات NFS.

بسبب نموذج مواز، عملياتها، وخادم ويب أباتشي في حاجة إلى توفير شكل من أشكال التزامن عند الوصول إلى موارد معينة. واحد من هذه الأساليب تزامن ينطوي على اتخاذ اقفال على ملف، وهو ما يعني أن الملفات بارزون في lockfile يقيم يجب أن يعتمد تأمين. في كثير من الحالات يمكن أن يعني هذا أنه لا يمكن إبقاء على نظام الملفات NFS محمولة.

تسبب خادم الويب إلى العمل حول قيود قفل NFS، وتشمل خط مثل التالية في ملفات تكوين الملقم:


LockFile / فار / تشغيل / أباتشي للانغلاق
وينبغي أن لا يكون الدليل قابل للكتابة بشكل عام (على سبيل المثال، لا تستخدم / فار / TMP). راجع LockFile الوثائق لمزيد من المعلومات.

عندما أحاول بدء أباتشي من نافذة دوس، أحصل على رسالة مثل "لا يمكن تحديد اسم المضيف. استخدام الخادم التوجيه لتعيين يدويا." ماذا يعني هذا؟

فهو يعني ما يقول، والبرمجيات أباتشي لا يمكن تحديد اسم المضيف من النظام الخاص بك. تحرير أسيوط بك \ ملف httpd.conf، والبحث عن السلسلة " الخادم "، وتأكد من أن هناك توجيها uncommented مثل

الخادم المضيف المحليأو

الخادم www.foo.comفي الملف. تصحيح ذلك إذا كان هناك أحد هناك مع معلومات خاطئة، أو إضافة واحدة إذا لم يكن لديك بالفعل واحدة.

أيضا، تأكد من أن لديك نظام ويندوز وتمكين DNS. راجع مكون إعداد TCP / IP من شبكة الإنترنت أو لوحة التحكم خيارات.

بعد التحقق من أن يتم تمكين DNS وأن يكون لديك اسم المضيف في صالح الخاص بك الخادم التوجيه، في محاولة لبدء تشغيل الخادم مرة أخرى.

"حدث خطأ النظام 1067. تم إنهاء العملية بشكل غير متوقع." عندما أحاول بدء تشغيل اباتشي على ويندوز، وأحصل على رسالة مثل ماذا يعني هذا؟

هذه الرسالة يعني أن خادم الويب لم يتمكن من البدء بشكل صحيح لسبب أو لآخر. لمعرفة السبب، وتنفيذ الأوامر التالية في إطار DOS:

ج: مؤتمر نزع السلاح "\ ملفات البرنامج \ اباتشي مجموعة \ اباتشي" أباتشي
(ضرب إذا كنت لا تحصل على الجزء الخلفي الفوري، والتحكم C-تسبب أباتشي للخروج.)

وسوف ترى الخطأ من المحتمل أن يكون واحدة من تلك التي سبقت هذا السؤال في أسئلة وأجوبة.

أولا التحقق من الأحداث Windows NT سجل للأخطاء التطبيق باستخدام برنامج ويندوز NT/2000 حدث عارض. وسيتم تخزين أي الأخطاء التي تحدث قبل فتح سجل الخطأ أباتشي هنا، إذا تم تشغيل أباتشي ويهدف الى خدمة على NT أو 2000. كما هو الحال مع أي خطأ، والتحقق من السجل الخاص بك أيضا خطأ أباتشي.

على نظام لينكس سوزي، وأنا أحاول وتكوين لمراقبة الدخول باستخدام المصادقة الأساسية. على الرغم من أنني تحذو حذو بالضبط، فشل المصادقة، ورسالة خطأ "مشرف: لا قوات الدفاع الوطني صالحة: ...". يتم تسجيل.

في توزيع سوزي، وقد أضيفت إضافية مصادقة طرف 3 وحدات وتفعيلها من خلال التقصير. هذه الوحدات تتداخل مع وحدات قياسية أباتشي وتسبب المصادقة الأساسية للفشل. توصية لدينا هو أن أعلق كل هذه الوحدات في / الخ / httpd / suse_addmodule.conf و / الخ / httpd / suse_loadmodule.conf التي ليست مطلوبة في الواقع لتشغيل الخادم الخاص بك.

لماذا أتلقى رسائل الخادم إعادة دوريا، عندما لم أكن إعادة تشغيل الملقم؟

المشكلة: أنت يلاحظ رسائل إعادة التشغيل في سجل خطأ الخاص بك، وبشكل دوري، عندما كنت أعلم أنك لم إعادة تشغيل الملقم نِفَسٌ ك:


[خميس 6 يونيو 04:02:01 2002] تلقى [إشعار] SIGHUP. محاولة إعادة تشغيل
[خميس 6 يونيو 04:02:02 2002] [إشعار] أباتشي تكوين - استئناف العمليات العادية
فحص وظائف كرون لمعرفة عندما / إذا سجلات الخادم الخاص بك ويجري تدويرها. قارن ذلك الوقت من تناوب على خطأ وقت الرسالة. إذا كانت هي نِفَسٌ ها، يمكنك بأمان إلى حد ما تفترض أن إعادة التشغيل ومن المقرر أن خادم بتسجيل تناوبت.

لماذا أحصل على "وحدة نمطية الوحدة النمطية اسم غير متوافق مع هذا الإصدار من طراز أباتشي" رسائل في سجل خطأ الخاص بي؟

وحدة الرقم السحري (MMN) هو ثابت المعرفة في مصدر أباتشي مقترن التوافق ثنائي من وحدات. يتم تغييره عندما الهياكل الداخلية أباتشي، والمكالمات وظيفة وأجزاء كبيرة أخرى من API تغيير في مثل هذه الطريقة التي لا يمكن أن توافق ثنائي يمكن ضمان أي أكثر. بشأن تغير MMN، جميع وحدات طرف ثالث يجب أن تكون على الأقل معاد، وأحيانا قليلا حتى تغير من أجل العمل مع الإصدار الجديد من طراز أباتشي.

اذا كنت تريد الحصول على رسائل الخطأ أعلاه، اتصل ببائع من وحدة لثنائي جديد، أو ترجمة عليه إذا كان لديك الوصول إلى شفرة المصدر.

أسئلة تكوين E.

لماذا لا أستطيع تشغيل أكثر من المضيفين الظاهري <N>؟

كنت تشغل على الأرجح إلى محدودية الموارد في نظام التشغيل الخاص بك. الحد الأكثر شيوعا هو الحد لكل عملية على واصف ملف، والذي هو دائما تقريبا سبب مشاكل النظر عند إضافة المضيفين الظاهري. أباتشي في كثير من الأحيان لا يعطي رسالة خطأ بديهية لأنه عادة ما يكون بعض روتين مكتبة (مثل ل gethostbyname ()) التي تحتاج إلى واصف ملف ولا يشكو intelligibly عند فإنه لا يمكن الحصول عليها.

كل ملف السجل يتطلب واصف الملف، مما يعني أنه إذا كنت تستخدم وصول منفصلة وسجلات الخطأ لكل المضيف الظاهري، كل مضيف ظاهري يحتاج اصفات ملف اثنين. كل توجيهات استماع يحتاج أيضا على واصف ملف.

القيم النموذجية ل<N> التي شهدناها هي في حدود 1024 أو 2048. عندما المطبات الخادم في ملف الحد اصف، قد تفريغ الأساسية مع SIGSEGV، فإنه قد يتعطل فقط، أو أنه قد عرج على طول وسترى (ذات مغزى ربما) أخطاء في سجل خطأ. مشكلة واحدة المشتركة التي تحدث عند تشغيل في ملف الحد اصف هو أن يوقف تنفيذ نصوص CGI بشكل صحيح.

على ما يمكنك القيام به حيال ذلك:

خفض عدد استمع توجيهات
إذا لم تكن هناك خوادم أخرى تعمل على الجهاز على نِفَسٌ المنفذ ثم تقوم عادة لا تحتاج إلى أي استمع توجيهات على الإطلاق. افتراضيا أباتشي يستمع الى جميع العناوين على المنفذ 80.
تخفيض عدد ملفات السجل
يمكنك استخدام mod_log_config لتسجيل جميع الطلبات إلى ملف سجل واحد في حين بما في ذلك اسم المضيف الظاهري في ملف السجل. يمكنك كتابة السيناريو ثم لتقسيم ملف السجل إلى ملفات منفصلة في وقت لاحق إذا لزم الأمر. ويرد مثل هذا السيناريو مع توزيع أباتشي في SRC / الدعم / تقسيم ملف التسجيل ملف.
زيادة عدد واصفي ملف المتاحة للخادم
(راجع وثائق النظام الخاص بك في الحد أو أوامر ulimit). بالنسبة لبعض النظم، ومعلومات عن كيفية القيام بذلك يتوفر في أداء تلميحات صفحة. هناك مذكرة محددة لفري أدناه.
"لا تفعل ذلك" - محاولة تشغيل عدد أقل من الجنود مع الظاهرية
نشر العملية الخاصة بك عبر العمليات خادم متعددة (باستخدام استمع على سبيل المثال، ولكن انظر النقطة الأولى) و / أو الموانئ. وبما أن هذا هو الحد من نظام التشغيل، ليس هناك الكثير آخر متاح في طريق الحلول.

لماذا لا عملي ErrorDocument 401؟

أنت في حاجة لاستخدامها مع URL في النموذج "/ فو / شريط" وليس واحد مع أسلوب واسم المضيف مثل " http://host/foo/bar ". راجع ErrorDocument ثائق للحصول على التفاصيل. وقد تم توثيق هذا بشكل غير صحيح في الماضي.

لماذا اباتشي إرسال ملف على كل ذلك؟

أباتشي لا يرسل تلقائيا ملف على كل ردا على ذلك، إلا إذا قمت بإعادة تجميعها مع وحدة mod_usertrack، ومكن ذلك بشكل خاص مع CookieTracking التوجيه. هذه الوحدة قد تساعد المستخدمين على المسار، ويستعمل الكوكيز للقيام بذلك. إذا كنت لا تستخدم البيانات الناتجة عن mod_usertrack، لا ترجمة عليه في أباتشي.

لماذا لا الكوكيز العمل؟

اباتشي HTTPD يمر على رأس تعيين كوكي الخاص بك، مثل أي رأس أخرى. إذا الكوكيز لا تعمل وسوف يكون ذلك بسبب السيناريو الخاص بك لا يعمل بشكل صحيح أو متصفحك لا تستخدم الكوكيز أو لم يتم تعيين المتابعة لقبولهم.

كيف يمكنني إضافة برامج التصفح والمشيرين إلى سجلاتي؟

اباتشي يوفر عدة طرق مختلفة للقيام بذلك. الأسلوب المستحسن هو تجميع وحدة mod_log_config في التكوين الخاص بك واستخدام CustomLog التوجيه.

يمكنك تسجيل الدخول إما على معلومات إضافية في ملفات أخرى من السجل الخاص بك نقل عادي، أو يمكنك إضافتها إلى سجلات بالفعل مكتوب. على سبيل المثال:

CustomLog سجلات / access_log "ح٪٪٪ ل ش ر٪ \"٪ ص \ "٪ S٪ ب \"٪ {المرجعية} أنا \ "\"٪ {عامل المستخدم} أنا \ ""

وهذا إضافة قيم وكيل المستخدم: والمرجعية: رؤوس، والتي تشير إلى العميل وتشير صفحة، على التوالي، في نهاية كل سطر في سجل وصول.

قد ترغب في الإطلاع على مقال الاسبوع أباتشي بعنوان: "معلومات الزوار اللقاء: تخصيص وغفيليس الخاص بك" .

لماذا الدلائل الوصول إلى العمل إلا عندما تتضمن زائدة "/" (على سبيل المثال، http://foo.domain.com/ ~ / المستخدم) ولكن ليس عندما حذفت منه (على سبيل المثال، http://foo.domain.com/ ~ عَضّوِ)؟

عند الوصول إلى الدليل من دون "/" زائدة، أباتشي بحاجة إلى إرسال ما يسمى إعادة توجيه إلى العميل ليقولوا ذلك لإضافة خط مائل زائدة. اذا لم تفعل ذلك، فإن عناوين URL النسبية لا تعمل بشكل صحيح. عندما يرسل إعادة توجيه، فإنه يحتاج إلى معرفة اسم الملقم بحيث يمكن إدراجه في إعادة توجيه. هناك طريقتان للاباتشي لمعرفة ذلك، فإما أنه يمكن تخمين، أو يمكن أن أقول لكم ذلك. إذا تم تكوين DNS بشكل صحيح، فإنه يمكن تخمين عادة من دون أي مشاكل. إذا لم يكن، مع ذلك، فأنت بحاجة لمعرفة ما.

إضافة الخادم التوجيه إلى ملف التكوين ليقولوا ذلك ما اسم المجال من الملقم.

الشيء الآخر الذي يمكن أن يسبب أحيانا هذا العرض هو سوء فهم من Alias ​​التوجيهي، مما أدى إلى اسم مستعار العمل بخط مائل زائدة، وليس من دون واحدة. Alias ​​التوجيهي حرفية جدا، والأسماء المستعارة ما كنت اقول له. النظر في المثال التالي:

الاسم المستعار / المثال / / الوطن / على شبكة الاتصالات العالمية / المثال /
التوجيه يخلق فوق اسم مستعار لعناوين المواقع التي تبدأ ب / المثال /، ولكن لا اسم مستعار عناوين المواقع بدءا من / سبيل المثال. وهذا يعني، عنوان URL مثل http://servername.com/example/ ستحصل على المحتوى المطلوب، ولكن URL مثل http://servername.com/example سوف يؤدي إلى خطأ "الملف غير موجود".

الاسم المستعار التالية، من ناحية أخرى، سوف تعمل لكلتا الحالتين:

الاسم المستعار / المثال / الوطن / على شبكة الاتصالات العالمية / مثال
لماذا لا تسرد mod_info أي توجيهات؟

وحدة mod_info يتيح لك استخدام مستعرض ويب لمعرفة كيفية تكوين الخادم الخاص بك. من بين المعلومات التي تعرض لائحة وحدات وتوجهاتها التكوين. "التيار" القيم لتوجيهات ليست بالضرورة تلك التي من الخادم الذي يقوم بتشغيل، يتم استخراج هم من ملفات التكوين أنِفَسٌ هم في ذلك الوقت من هذا الطلب. إذا تم تغيير الملفات منذ أن تم شحنها مشاركة الخادم، والعرض لا تتطابق مع القيم بنشاط في الاستخدام. إذا كانت الملفات والمسار إلى ملفات ليست للقراءة من قبل المستخدم والذي كان الملقم قيد التشغيل (انظر توجيه المستخدم)، ثم يمكن mod_info لم يقرأ لهم من أجل إدراج قيمها. وسوف تتاح إدخال في سجل خطأ في هذا الحدث، ولكن.

يتم تجاهل بلدي. ملفات هتكس.

هذا هو دائما تقريبا بسبب الخاص AllowOverride التوجيه التي يجري وضعها بشكل غير صحيح عن الدليل في المسألة. وإذا تم تعيينها إلى لا شيء بعد ذلك. لا ملفات تاكيس حتى يتم النظر ل. هذا أمر جيد. إذا كان لديك الوصول إلى تحرير httpd.conf و، يجب عدم استخدام الملفات. تاكيس، من أي وقت مضى. إذا كان الزبائن بحاجة لدعم تاكيس، تأكد من أن AllowOverride يتم تعيين إلى شيء معقول (أي: لم يكن كلها).أن تكون على يقين أنه يغطي الدليل الذي تحاول استخدام ملف htaccess. فيها ويتم إنجاز هذا عادة عن طريق ضمان فمن داخل الحاوية الدليل الصحيح.

يمكنك معرفة ما إذا كان هذا هو المشكلة عن طريق إضافة نص هراء إلى ملف htaccess الخاص بك. وإعادة تحميل الصفحة. إذا كنت لا تحصل على خطأ في الخادم، ثم اباتشي HTTPD لم يتم قراءة ملف htaccess الخاص بك.

لماذا أحصل على "المحرمة" الرسالة كلما أحاول الوصول إلى دليل معين؟

ويتسبب عادة هذه الرسالة لأنه إما

نظام الملفات الأساسية أذونات لا تسمح للمستخدم / مجموعة تحت أباتشي التي يعمل للوصول إلى الملفات الضرورية، أو
تكوين أباتشي لديها بعض القيود المفروضة على الوصول في المكان الذي يمنع الوصول إلى الملفات.
يمكنك تحديد هذه الحالة تنطبق على الوضع الخاص بك عن طريق التحقق من سجل خطأ.

في الحالة التي يكون فيها ملف إذن النظام هي على خطأ، انظر (13) الإذن مرفوض لمزيد من المعلومات.

لماذا ملفاتي تظهر بشكل صحيح في Internet Explorer، ولكن كما تظهر مصدر أو يؤدي الى نافذة الحفظ مع نتسكيب، أو، لماذا لا إنترنت إكسبلورر تجعل النص الخاص بي / وثيقة واضحة بشكل صحيح؟

مرض التصلب العصبي المتعدد إنترنت إكسبلورر (MSIE) ونتسكيب التعامل مع الكشف عن نوع MIME بطرق مختلفة، وبالتالي سيتم عرض هذه الوثيقة بشكل مختلف. على وجه الخصوص، أي يعتمد أحيانا على امتداد الملف أو محتويات الملف لتحديد نوع MIME. وهذا يمكن أن يحدث عندما يكون الملقم يحدد نوع MIME التطبيق / الثماني، تيار أو النص / عادي. هذا السلوك يشكل انتهاكا لمعيار HTTP ويجعل من المستحيل لتسليم وثائق نص عادي إلى MSIE العملاء في بعض الحالات. مزيد من التفاصيل متاحة على MSIE في نوع MIME سلوك كشف في مقال MSDN ومذكرة من قبل آلان ج. فلافيل.

أفضل يمكنك القيام به كمسؤول خادم لتكوين بدقة نوع MIME من المستندات الخاصة بك عن طريق تحرير ملف mime.types أو باستخدام AddType التوجيه في ملفات التكوين أباتشي. في بعض الحالات، قد تكون قادرة على خداع MSIE إلى تقديم النص / وثائق واضحة بشكل صحيح عن طريق ضمان لديهم ملف TXT. تمديد، ولكن هذا لن ينجح إذا MSIE يعتقد أن محتوى يبدو وكأنه نوع ملف آخر.

موقعي هو الوصول تحت أسماء المضيفين كثيرة مختلفة، وكيف يمكنني توجيه العملاء، بحيث ترى سوى اسم واحد؟

كثير من المواقع تعيين مجموعة متنوعة من أسماء المضيفين إلى نفس المضمون. على سبيل المثال، قد www.example.com، example.com وwww.example.net تشير جميعها إلى نِفَسٌ الموقع. فمن الأفضل للتأكد من أنه، بغض النظر عن اسم استخدام العملاء للوصول إلى الموقع، وسيتم توجيهها إلى اسم المضيف، واحدة الكنسي. هذا يجعل الموقع أسهل للحفاظ على ويؤكد أنه سيكون هناك إصدار واحد فقط من موقع في مخابئ وكيل ومحركات البحث.

هناك نوعان من التقنيات لتنفيذ أسماء المضيفين الكنسي:

استخدام mod_rewrite كما هو موضح في "الكنسي أسماء مضيفين" من دليل إعادة كتابة عنوان.

انظر http://httpd.apache.org/docs/current/rewrite/rewrite_guide.html # canonicalurl .

استخدم اسم القائم على استضافة الظاهري:

NameVirtualHost *: 80
<VirtualHost *:80>
الخادم www.example.net
ServerAlias ​​example.com
إعادة توجيه دائم / http://www.example.com/
</ VirtualHost>

<VirtualHost *:80>
www.example.com الخادم
DocumentRoot / البيرة / المحلية / اباتشى / htdocs
</ VirtualHost>
لماذا يمكنني الوصول إلى موقع الويب الخاص بي من الملقم أو من شبكة الاتصال المحلية، ولكن أنا لا يمكن الوصول إليه من أي مكان آخر على شبكة الإنترنت؟

هناك العديد من الأسباب المحتملة لهذا، وتقريبا وترتبط كل منها لتكوين الشبكة الخاصة بك، وليس تكوين خادم HTTP أباتشي. واحدة من المشاكل الأكثر شيوعا هو أن جدار الحماية بحظر الوصول إلى الافتراضي HTTP المنفذ 80. على وجه الخصوص، مزودي خدمات الإنترنت المستهلك العديد من منع الوصول إلى هذا المنفذ. يمكنك معرفة ما إذا كان هذا هو الحال من خلال تغيير أي ميناء واستمع توجيهات في httpd.conf و لاستخدام المنفذ 8000 ومن ثم طلب موقع الخاص http://yourhost.example.com:8000/ . (وبطبيعة الحال، قد جدار حماية تقييدية جدا منع هذا المنفذ كذلك.)

كيف يمكنني تشغيل قوائم الدليل التلقائي أو إيقاف تشغيله؟

إذا طلب العميل URL الذي يعين الدليل والدليل لا يحتوي على اسم الملف الذي يطابق DirectoryIndex التوجيه، ومن ثم يمكن تكوين mod_autoindex لتقديم قائمة من محتويات الدليل.

لتشغيل دليل الفهرسة الآلية، والعثور على توجيه الخيارات التي تنطبق على الدليل وإضافة الكلمة فهارس. على سبيل المثال:

<Directory /path/to/directory>
خيارات + فهارس
</ دليل>
لإيقاف تلقائي الفهرسة الدليل، وإزالة الكلمة فهارس من سطر الخيارات المناسبة. لإيقاف سرد الدليل للحصول على دليل فرعي معين، يمكنك استخدام خيارات، فهارس. على سبيل المثال:

/path/to/directory> <Directory
خيارات، فهارس
لماذا بلادي خيارات توجيهات لا يكون لها الأثر المطلوب؟

وتطبق التوجيهات وضعت في ملفات التكوين في ترتيب معين للغاية، كما وصفها كيف عمل أقسام دليل، الموقع، والملفات . وبالإضافة إلى ذلك، فإن كل الخيارات التوجيه له تأثير إعادة الخيارات مقابل لا شيء قبل إضافة خيارات معينة (ما لم يكن فقط "+" و "-" تستخدم الخيارات). والنتيجة هي أن الخيارات المحددة في الخادم الرئيسي أو الظاهرية السياق المضيف (خارج أي دليل، والمكان، أو قسم الملفات) وعادة ما يكون له تأثير، لأنها تجاوز أكثر التوجيهات خيارات محددة. على سبيل المثال، في ما يلي


/usr/local/apache/htdocs> <Directory
خيارات فهارس
خيارات تشمل ExecCGI
ويتضمن ExecCGI ستكون ثماره في البيرة / / المحلية / اباتشى / htdocs الدليل.

يمكنك تجنب المشاكل من خلال ايجاد عادة إما توجيه الخيارات التي تنطبق بالفعل على دليل محدد وتغييرها، أو عن طريق وضع الخاص بك خيارات التوجيه داخل القسم <Directory> ممكن الأكثر تحديدا.

كيف يمكنني تغيير المعلومات التي أباتشي الإسترجاع عن نِفَسٌ ها في رؤوس؟

عندما يتصل عميل إلى أباتشي، وهي جزء من المعلومات التي تم إرجاعها في رؤوس هو اسم "اباتشي" للمزيد من المعلومات التي يمكن إرسالها هو رقم الإصدار، مثل "2.2.17"، نظام التشغيل، وقائمة غير الوحدات القياسية التي قمت بتثبيتها.

على سبيل المثال:

الخادم: Apache/2.2.17 (يونيكس) mod_perl/1.26 في كثير من الأحيان، الناس يريدون إزالة هذه المعلومات، في ظل فهم خاطئ أن يؤدي ذلك إلى جعل النظام أكثر أمانا. وربما هذا هو ليس كذلك، كما من المرجح أن يستغل نِفَسٌ ه يكون حاول بغض النظر عن المعلومات التي توفرها رأس.

هناك، ومع ذلك، واثنين من الاجابات على هذا السؤال: الجواب الصحيح، والجواب الذي كنت تبحث على الأرجح ل.

الإجابة الصحيحة على هذا السؤال هو أنه يجب عليك استخدام ServerTokens التوجيه لتغيير كمية المعلومات التي يتم تمريرها في رؤوس. وسوف يحدد هذا التوجيه لحث تمرير كمية أقل قدر ممكن من المعلومات:

الخادم: أباتشي الجواب ربما كنت تبحث عنه هو كيفية جعل أباتشي يكذب بشأن ما ما هو عليه، أي إرسال شيء من هذا القبيل:

الخادم: خادم بوب HTTPD سعيد من أجل القيام بذلك، سوف تحتاج إلى تعديل التعليمات البرمجية المصدر أباتشي وإعادة بناء أباتشي. لا ينصح بذلك، لأنه بات من شبه المؤكد أن لا توفر لك الأمن وأضاف كنت تعتقد أنك تكتسب. يتم ترك بالضبط طريقة للقيام بذلك باعتبارها ممارسة للقارئ، كما أننا لسنا حريصين على مساعدتك في القيام بشيء ما هي في جوهرها فكرة سيئة.

لماذا أرى طلبات للحصول على المواقع الأخرى التي تظهر في ملفات السجل الخاص بي؟

ويمكن إدخال access_log تظهر هذه الحالة تبدو مثل هذا:

63.251.56.142 - [25/Jul/2002: 00:48:04 -0700] "GET http://www.yahoo.com/ HTTP/1.0 "200 1456والسؤال هو: لماذا طلب www.yahoo.com تأتي إلى الخادم الخاص بك بدلا من خادم ياهو؟ ولماذا يكون الرد على رمز حالة 200 (النجاح)؟

هذا هو عادة نتيجة للعملاء محاولة خبيثة لاستغلال خوادم بروكسي مفتوحة للوصول إلى موقع على شبكة الانترنت دون الكشف عن مواقعها الحقيقية. إذا وجدت مثل هذه القيود في السجل الخاص بك، فإن أول شيء فعله هو التأكد من انك صحيح تكوين الخادم الخاص بك ليس إلى وكيل لعملاء غير معروف. إذا كنت لا تحتاج إلى توفير خادم وكيل في كل شيء، يجب أن أؤكد ببساطة أن ProxyRequests لم يتم تعيين التوجيه في. إذا كنت لا تحتاج إلى تشغيل ملقم وكيل، ثم يجب عليك التأكد من الحصول على الخادم الخاص بك بشكل صحيح بحيث عملاء المخولين فقط يمكن استخدامها.

إذا تم تكوين الخادم الخاص بك بشكل صحيح، ثم محاولة من خلال وكيل الخادم الخاص بك فشل. إذا كنت ترى رمز حالة من 404 (لم يتم العثور على ملف) في السجل، ثم أنت تعلم أن فشل الطلب. إذا كنت ترى رمز الحالة 200 (نجاح)، وهذا لا يعني بالضرورة أن محاولة الوكيل نجحت. RFC2616 قسم 5.1.2 ولذلك يجب ان تقبل طلبات اباتشي مع عناوين المواقع المطلقة في URI-الطلب، حتى بالنسبة لغير الوكيل الطلبات. منذ أباتشي لا يوجد لديه طريقة لمعرفة جميع الأسماء المختلفة التي قد تكون معروفة خادم تحت، فإنه لا يمكن رفض ببساطة أسماء مضيفين أنها لا تعترف. بدلا من ذلك، وسوف تخدم طلبات للحصول على مواقع غير معروف محليا من ملابسه واستخدام اسم المضيف الملقم الافتراضي أو المضيف الظاهري. لذلك يمكنك مقارنة حجم الملف (1456 في المثال أعلاه) إلى حجم ملف المناظرة في الملقم الافتراضي الخاص بك. إذا كانت هي نِفَسٌ ها، ثم محاولة الوكيل فشلت، منذ أن تم تسليم وثيقة من الخادم الخاص بك، وليس وثيقة من www.yahoo.com.

إذا كنت ترغب في منع هذا النوع من الطلب تماما، فأنت بحاجة للسماح للأباتشي معرفة ما أسماء المضيفين لقبول ورفض ما أسماء المضيفين. يمكنك القيام بذلك عن طريق تكوين المضيفين الاسم الظاهري، حيث تستضيف الأولى المذكورة هو المضيف الافتراضي الذي سوف الصيد ورفض أسماء المضيفين غير معروف. على سبيل المثال:


NameVirtualHost *: 80

<VirtualHost *:80>
default.only الخادم
<Location />
طلب السماح، ورفض
كل من رفض
</ الموقع>
</ VirtualHost>

<VirtualHost *:80>
الخادم realhost1.example.com
alias1.example ServerAlias. كوم alias2.example.com
DocumentRoot / path/to/site1
</ VirtualHost>
...
واو المحتوى الديناميكي (CGI، ومباحث أمن الدولة)

كيف يمكنني تمكين تنفيذ CGI في الدلائل الأخرى من ScriptAlias؟

أباتشي تسلم جميع الملفات في دليل اسمه باعتباره scriptalias التي كونها مؤهلة للتنفيذ بدلا من تجهيز وثائق عادية. وينطبق هذا بغض النظر عن اسم الملف، لذلك مخطوطات في scriptalias التي لا تحتاج إلى دليل الكشف عن اسمه "*. CGI" أو "*. رر" أو أيا كان. وبعبارة أخرى، كافة الملفات في scriptalias التي هي دليل النصوص، بقدر ما تشعر بالقلق أباتشي.

لإقناع أباتشي لتنفيذ البرامج النصية في مواقع أخرى، مثل في الدلائل حيث الوثائق العادية قد يعيش أيضا، يجب أن يقولوا ذلك كيفية التعرف عليهم - وأيضا على أنه لا بأس من تنفيذها. لهذا، تحتاج إلى استخدام ما يشبه AddHandler التوجيه.

في القسم المناسب من الملفات تكوين الملقم، إضافة خط مثل AddHandler CGI-النصي. CGIسيقوم الملقم ثم تعترف أن جميع الملفات الموجودة في هذا الموقع (وتنحدر منها المنطقية) التي تنتهي في. "CGI" هي ملفات البرنامج النصي، وليس وثائق.

تأكد من أن يتم تغطيتها من قبل موقع الدليل إعلانا الخيارات التي تتضمن خيار ExecCGI. في بعض الحالات، قد لا ترغب في السماح فعلا جميع الملفات المسماة "*. CGI" لتكون قابلة للتنفيذ. ربما كل ما تريد هو تمكين ملف معين في دليل الطبيعي أن تكون قابلة للتنفيذ. ويمكن إنجاز هذا بدلا من ذلك عن طريق mod_rewrite والخطوات التالية:

إضافة محليا إلى ملف htaccess المقابلة من مجموعة الأوامر مشابهة لهذه واحدة.:

RewriteEngine على
RewriteBase ~ / فو / شريط /
. RewriteRule ^ quux \ CGI $ - [T = التطبيق / x-هتبد-CGI]
تأكد من أن يتم تغطيتها من قبل موقع الدليل إعلانا الخيارات التي تتضمن ExecCGI و FollowSymLinks خيار.

ماذا يعني عندما سى جي آي إس بي تفشل مع "من السابق لأوانه نهاية رؤوس السيناريو"؟

هذا يعني فقط ما تقول: خادم كانت تتوقع مجموعة كاملة من رؤوس HTTP (واحد أو أكثر متبوعا سطر فارغ)، ولم يحصل عليها.

السبب الأكثر شيوعا لهذه المشكلة هو البرنامج النصي يموتون قبل إرسال مجموعة كاملة من رؤوس، أو ربما أي في كل شيء، إلى الخادم. لنرى ما اذا كان هذا هو الحال، حاول تشغيل مستقل النصي من جلسة تفاعلية، بدلا من أن يكون السيناريو ضمن الملقم. اذا كان لديك رسائل الخطأ، وهذا يكاد يكون من المؤكد ان سبب "نهاية مبكرة من رؤوس النصي" رسالة. حتى لو كان CGI يعمل غرامة من سطر الأوامر، تذكر أن البيئة وأذونات قد تكون مختلفة عندما تعمل تحت خادم الويب. يمكن فقط الوصول إلى موارد CGI يسمح للمستخدم ومجموعة المحدد في التكوين الخاص بك اباتشي. وبالإضافة إلى ذلك، فإن البيئة لا يكون هو نِفَسٌ ه واحد
الرجوع الى أعلى الصفحة اذهب الى الأسفل
apache
اعضاء فعالين
اعضاء فعالين
apache


عدد المشاركات : 123
نقاط : 227
التقيم : 20
تاريخ الميلاد : 15/03/1990
تاريخ التسجيل : 14/08/2012
العمر : 34

لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Empty
مُساهمةموضوع: رد: لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟   لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء أغسطس 14, 2012 10:28 am


ما هو اباتشي؟

وأباتشي خادم HTTP

هو ومرنة قوية، وشبكة متوافقة مع HTTP/1.1 خادم
تطبق على أحدث البروتوكولات، بما في ذلك HTTP/1.1 (RFC2616)
هو شكلي للغاية وقابلة للتوسيع مع طرف ثالث وحدات
يمكن تخصيصها من خلال كتابة "وحدات" باستخدام وحدة اباتشي API
يقدم كامل شفرة المصدر ويأتي مع رخصة مقيد
يعمل على ويندوز 2000، 5.X Netware و أعلاه، OS / 2، ومعظم إصدارات يونيكس، فضلا عن العديد من أنظمة التشغيل الأخرى
وبنشاط التي يجري تطويرها
تشجع ردود الفعل المستخدم من خلال أفكار جديدة، والتقارير الشوائب والبقع
وتنفذ العديد من الميزات المطلوبة بشكل متكرر، بما في ذلك:
DBM قواعد البيانات كذلك، وقواعد البيانات العلائقية وLDAP للمصادقة
يسمح لك بسهولة انشاء محمية بكلمة مرور صفحات مع أعداد هائلة من المستخدمين المصرح لهم، دون التعثر بانخفاض الخادم.
مخصصة الردود على الأخطاء والمشكلات
يسمح لك إعداد الملفات، أو حتى نصوص CGI، والتي يتم إرجاعها من قبل الملقم استجابة للأخطاء والمشاكل، على سبيل المثال إعداد سيناريو لاعتراض أخطاء خادم 500 ونفذ على رأس ذبابة التشخيص لكل من المستخدمين ونِفَسٌ ك.
متعددة DirectoryIndex توجيهات - يسمح لك لنقول DirectoryIndex index.html وindex.cgi، الذي يرشد الخادم لإرسال index.html وإما العودة أو تشغيل index.cgi عند طلب URL الدليل، أيهما يجدها في الدليل.
URL مرن غير محدود اعادة كتابة والتعرج - أباتشي ليس له حدود ثابتة على عدد من الأسماء المستعارة والموجهات التي قد تعلن في ملفات التكوين. وبالإضافة إلى ذلك، يمكن استخدام محرك قوي إعادة كتابة إلى حل معظم المشاكل تلاعب URL.
التفاوض محتوى - أي القدرة على خدمة العملاء تلقائيا متفاوتة التطور وHTML مستوى الامتثال، مع الوثائق التي تقدم أفضل تمثيل من المعلومات التي تفيد بأن العميل قادر على الموافقة.
المضيفين الظاهري - يسمح الملقم للتمييز بين الطلبات التي قدمت إلى عناوين IP مختلفة أو أسماء (تعيينها إلى نِفَسٌ الجهاز). أباتشي كما يقدم شكلي حيوي الشامل استضافة الظاهري.
شكلي موثوق سجلات الأنابيب - يمكنك تكوين أباتشي لتوليد سجلات في الشكل الذي تريده. ضرب وبالإضافة إلى ذلك، في معظم أبنية يونيكس، أباتشي يمكن أن ترسل ملفات السجل إلى أنبوب، والسماح لتناوب السجل، والترشيح، في الوقت الحقيقي من تقسيم vhosts متعددة في سجلات منفصلة، ​​وغير المتزامن حل DNS على الطاير.
كيف ولماذا تم إنشاء أباتشي HTTP خادم؟

في وثيقة أباتشي حول ما يفسر كيف أن مشروع أباتشي تطورت من بداياتها وذلك امتدادا للمشروع هتبد NCSA إلى وضعه الحالي واحدة من أسرع وخوادم الويب الأكثر كفاءة، وظيفية أكثر في وجود.

لماذا اسم "أباتشي"؟

وقد تم اختيار "أباتشي" على اسم من الاحترام لقبيلة الهنود الأميركيين الأصليين من نوع اباتشي (INDE)، معروف جيدا لمهاراتهم الفائقة في استراتيجية الحرب وقدرتهم على التحمل لا ينضب. لمزيد من المعلومات عن الأمة أباتشي، نقترح البحث غوغل، أو روابط إلى .

ثانوي، وأكثر من ذلك شعبيا (على الرغم من بشكل غير صحيح) وقبلت، انها اسم لطيف النظر الذي تمسك. اباتشي هو "ملقم غير مكتمل". كان هذا بناء على بعض التعليمات البرمجية الموجودة، وسلسلة من "ملفات التصحيح".

هذه أباتشي أيام على هذا النحو يعني أكثر من ذلك بكثير. إنها أولا وقبل كل شيء مؤسسة البرمجيات أباتشي، والتي بموجبها هناك العشرات من المشاريع.

كيف يمكن للاباتشي HTTPD أداء مقارنة إلى خوادم أخرى؟

المعايير تميل الى ان تكون على قدر من competance التكوين، بدلا من جودة الخدمة. وهذا هو، إذا كنت خبيرا في IIS، يمكنك الحصول على الأرجح ليتم تشغيله بشكل أسرع من التي يمكنك الحصول عليها لتشغيل أباتشي. يمكنك أن تجد لذلك comparisions من ملقمات HTTP المختلفة التي تثبت أن كل أسرع من كل الآخرين. ونحن نميل إلى اتخاذ معايير أداء الخادم مع حبة الملح.

كيف اختباره هو اباتشي HTTPD؟

يتم تشغيل اباتشي على خوادم الإنترنت أكثر من 120 مليون دينار (اعتبارا من أبريل 2010) (المصدر، نيتكرافت ). وقد تم اختباره بشكل دقيق من قبل كل من المطورين والمستخدمين. مشروع أباتشي خادم HTTP إدارة اللجنة على معايير صارمة قبل إطلاق إصدارات جديدة من الخادم الخاص بهم، والخادم يعمل دون وجود عوائق على أكثر من نصف من كافة ملقمات WWW المتوفرة على شبكة الإنترنت. عندما البق لا تظهر، ونحن الافراج عن بقع والإصدارات الجديدة حالما تصبح متاحة.

ما هي الخطط المستقبلية لهتبد أباتشي؟

إلى الاستمرار في القيام بدور "المصادر المفتوحة" وبدون تكلفة مقابل استخدام HTTP خادم،
لمواكبة التطورات في بروتوكول HTTP والتطورات على شبكة الإنترنت بشكل عام،
لجمع مقترحات لإصلاحات / تحسينات من مستخدميها،
للاستجابة لاحتياجات مقدمي حجم كبير وكذلك المستخدمين في بعض الأحيان.
الذي يمكنني الاتصال به للحصول على الدعم؟

انظر http://httpd.apache.org/support.html .

هل هناك أي مزيد من المعلومات المتاحة عن اباتشي httpd؟

في الواقع هناك. راجع موقع الويب Apache الرئيسي الخادم . وهناك أيضا العديد من الكتب حول الملقم HTTP أباتشي المتاحة.

أين يمكنني الحصول على هتبد أباتشي؟

يمكنك معرفة كيفية تحميل مصدر للأباتشي في موقع رئيسي أباتشي خادم الويب .

أين يمكنني تحميل (مصدقة) 64 اباتشي httpd ثنائيات بت لنظام التشغيل Windows؟

في الوقت الراهن، لا يوجد أحد. وتنتج المؤسسة برامج أباتشي مفتوحة المصدر البرامج. الثنائيات 32 بت المقدمة هي من باب المجاملة لأفراد المجتمع.

اسمحوا لي أن استخدام شعار اباتشي على المنتج الخاص بي أو موقع ويب؟

لا يجوز لك استخدام أي العمل الفني الأصلي من مؤسسة البرمجيات أباتشي، ولا تقديم، أو استخدام نسخ معدلة من هذه الأعمال الفنية، إلا وفقا للشروط في سياسة أباتشي العلامات التجارية الوثيقة.

B. العام أسئلة فنية

"لماذا لا أستطيع ...؟ لماذا لا ... العمل؟" ما يجب القيام به في حالة حدوث مشاكل

إذا كنت تواجه مشكلة مع برنامج خادم أباتشي، يجب اتخاذ الخطوات التالية:

التحقق من errorlog!
أباتشي يحاول أن يكون مفيدا عندما يواجه مشكلة. في كثير من الحالات، فإنه سيتم تقديم بعض التفاصيل عن طريق كتابة واحد أو رسائل إلى خادم سجل خطأ. أحيانا هذا يكفي بالنسبة لك لتشخيص وعلاج هذه المشكلة نِفَسٌ ك (مثل أذونات الملف أو ما شابه ذلك). الموقع الافتراضي لسجل الخطأ هو / البيرة / المحلية / اباتشى / السجلات / error_log، لكنهم يرون أن ErrorLog التوجيه في ملفات التكوين لموقع على الخادم الخاص بك.
التحقق من التعليمات!
كنت بالفعل هنا.
فحص قاعدة البيانات الخطأ أباتشي
وتسجل معظم المشاكل التي تحصل أبلغ بها الفريق اباتشي في قاعدة البيانات الخطأ. يرجى الاطلاع على التقارير الموجودة، مفتوحة ومغلقة، قبل أن يضيف واحدة. إذا وجدت أنه تم بالفعل مشكلتك ذكرت، من فضلك لا تضيف "أنا أيضا" تقرير. إذا لم يتم إغلاق التقرير الأصلي حتى الآن، ونحن نقترح عليك مراجعة بشكل دوري. هل يمكن أن تنظر أيضا الاتصال المرسل الأصلي، لأنه قد يكون هناك تبادل الكتروني يدور حول هذه القضية التي لم يتم الحصول على تسجيلها في قاعدة البيانات.
نسأل مستخدم في فريق الدعم
وهناك الكثير من المشاكل المشتركة لا يصل الى قاعدة البيانات الخطأ لأنه لا يوجد بالفعل سؤال وجواب ارتفاع حركة المرور حول لهم في القائمة البريدية للمستخدمين أو comp.infosystems.www.servers.unix ومجموعات الأخبار ذات الصلة. هذه الأخبار هي أيضا متوفرة عبر غوغل. ويمكن الاطلاع على العديد من المستخدمين أباتشي، وبعض من المطورين، والتجوال بقاعاتها الظاهري، لذلك يقترح أن كنت تسعى حكمة هناك. وهناك احتمالات جيدة لأنك سوف تحصل على الجواب أسرع من هناك من قاعدة البيانات الخطأ، حتى لو كنت لا ترى سؤالك نشرت بالفعل.
إذا فشل كل شيء آخر، تقريرا عن مشكلة في قاعدة البيانات الخطأ
إذا كنت قد ذهبت من خلال تلك الخطوات المذكورة أعلاه أن تكون مناسبة وأن يتم الحصول على أي الإغاثة، ثم الرجاء ترك الفريق أباتشي تعرف عن هذه المشكلة من خلال تسجيل تقرير الخطأ.
إذا كانت المشكلة تنطوي على خادم تحطمها وتوليد تفريغ الأساسية، يرجى تشمل التتبع المعاكس (إن أمكن). كمثال على ذلك،

# مؤتمر نزع السلاح ServerRoot
هتبد DBX # الأساسية
(DBX) حيث
(البديل المواقع المناسبة لجهودكم ServerRoot وهتبد والملفات الأساسية. قد تضطر إلى استخدام GDB بدلا من DBX).

كيف يمكنني تقديم تصحيحا لهتبد أباتشي؟

ويمكن الاطلاع على معلومات مفصلة عن تقديم التقارير الشوائب والبقع في وثائق HTTP أباتشي خادم المطور .

لماذا سرقت أباتشي عنوان موقعي المفضل على الانترنت؟

الجواب بسيط هو: "من لم يفعل ذلك." وعادة ما تسبب هذا المفهوم الخاطئ من موقع في السؤال بعد أن هاجر إلى خادم أباتشي برامج الانترنت، ولكن ليس بعد أن هاجر محتوى الموقع حتى الآن. عندما يتم تثبيت أباتشي، الصفحة الافتراضية أن يحصل على تثبيت يقول مسؤول الموقع إلى نجاح عملية التثبيت. التوقع هو أنه سيتم استبدال هذه الصفحة الافتراضية مع محتوى الموقع الحقيقي. إذا لم يحدث ذلك، يشكو مسؤول الموقع، وليس إلى مشروع أباتشي - نحن فقط جعل البرنامج وغير مسؤولة عن ما يفعله الناس (أو لا تفعل) معها.

لماذا أحصل على البريد المزعج من موقع أباتشي؟

الجواب القصير هو: "أنت لا." عادة عندما يقوم شخص ما يعتقد أن موقع أباتشي ينشأ الرسائل غير المرغوب فيها، فذلك لأنها قد تتبع الرسائل غير المرغوب فيها إلى موقع ويب، وموقع ويب تقول انها تستخدم أباتشي. راجع إدخال التعليمات السابقة لمزيد من التفاصيل حول هذه الظاهرة.

لا البريد المزعج تسويق تنبع من موقع أباتشي. البريد الوحيد الذي يأتي من موقع يذهب فقط إلى عناوين التي تم طلبها لتلقي البريد.

أنا قد تشمل البرمجيات أباتشي على قرص مضغوط أو حزمة أخرى أنا توزيع؟

يمكن العثور على إجابة مفصلة على هذا السؤال في رخصة أباتشي، والتي يتم تضمينها في توزيع اباتشي في ملف الترخيص. يمكنك أن تجد أيضا على شبكة الإنترنت في http://www.apache.org/licenses/ .

ما هو أفضل الأجهزة / نظام التشغيل / ... كيف يمكنني الحصول على أقصى استفادة من خدمة بلدي الويب اباتشي؟

اطلع على صفحة ضبط الأداء .

ما هي "التعابير العادية"؟

التعابير العادية هي طريقة لوصف نمط - على سبيل المثال، "كل الكلمات التي تبدأ بحرف A" أو "كل رقم الهاتف 10 مكونة" أو حتى "في كل جملة مع اثنين من الفواصل في ذلك، وليس رأس المال س حرف" . التعابير العادية (ويعرف أيضا باسم "رجإكس" ليالي) مفيدة في أباتشي لأنها تتيح لك تطبيق سمات معينة ضد مجموعات من الملفات أو الموارد في طرق مرنة للغاية - على سبيل المثال، جميع ملفات GIF و JPG تحت أي دليل "صور" يمكن أن تكون مكتوبة. كما / صور / *. (JPG | GIF) $ . لاحظ أن هتبد ليست بحاجة الى ترسيم / / وذلك لتجنب "المسواك" عند مطابقة أو محددات المسارات، مثل: ؟ / \ / فو \ / شريط \ / /

أفضل نظرة عامة حول هو على الارجح احد والتي تأتي مع بيرل . تعبيرات أباتشي العادية استخدام PCRE - بيرل التعبير العادية متوافق .

لماذا لا يكون هناك ثنائي لبرنامجي؟

للمطورين تأكد من أن البرنامج يبني ويعمل بشكل صحيح على الأنظمة الأساسية المتاحة لهم، وهذا لا يعني بالضرورة أن النظام الأساسي الخاص بك هو واحد منهم. وبالإضافة إلى ذلك، ملقم HTTP أباتشي المشروع هو في المقام الأول مصدر المنحى، وهذا يعني أن توزيع سارية المفعول ويمكن البناء عليها شفرة المصدر هو الغرض من بيان، وليس التأكد من أن هناك حزمة ثنائي لجميع الأنظمة الأساسية المعتمدة.

إذا كنت لا نرى ان هناك عدة عن النظام الأساسي الخاص بك المدرجة في مجال التوزيع ثنائي ( http://httpd.apache.org/dist/httpd/binaries/ )، فهذا يعني إما أن النظام الأساسي لا تتوفر على أي من للمطورين، أو أنها فقط لم نصل في جميع أنحاء لإعداد ثنائي لذلك. لأن هذا هو مشروع طوعي، فهي ليست ملزمة للقيام بذلك. ويتم تشجيع المستخدمين، ومن المتوقع أن بناء البرمجيات أنِفَسٌ هم.

الاستثناء الوحيد لهذه الممارسات هو حزمة ويندوز. وخلافا لمعظم منصات يونيكس ويونيكس مثل، أنظمة ويندوز لا تأتي مع بيئة تطوير البرمجيات المجمعة، لذلك نحن لا تعد مجموعات ثنائي لنظام التشغيل Windows عندما نتخذ بيان. مرة أخرى، ومع ذلك، فإنه أمر طوعي، وسوى عدد محدود من المطورين لديها القدرة على بناء InstallShield حزمة، وبالتالي فإن إطلاق ويندوز قد تأخر بعض الشيء وراء الافراج عن المصدر. وينبغي أن يكون هذا الفارق ليس أكثر من بضعة أيام على الأكثر.

جيم هتبد مبنى أباتشي

لماذا أحصل على خطأ عن مرجع غير معروف "ل__inet_ntoa" أو غيرها من الرموز inet_ __ *؟

إذا كنت قد قمت بتثبيت BIND-8 ثم وهذا هو عادة بسبب وجود صراع بين الملفات وتشمل والمكتبات الخاصة بك. BIND-8 يثبت لها وتشمل الملفات والمكتبات / البيرة / المحلية / وتشمل / و / البيرة / المحلية / ليب /، في حين تم تثبيت ربما محلل الذي يأتي مع النظام الخاص بك في / البيرة / وتشمل / و / البيرة / ليب /. إذا كان النظام يستخدم الملفات رأس في / البيرة / المحلية / وتشمل / قبل تلك الموجودة في / البيرة / وتشمل / لكنك لا تستخدم المكتبة محلل جديد، ثم النسختين سوف تتعارض.

لحل هذه المشكلة، يمكنك جعل إما من استخدام وتشمل الملفات والمكتبات التي تأتي مع النظام أو للتأكد من استخدام جديدة تشمل الملفات والمكتبات. مضيفا-lbind إلى خط EXTRA_LDFLAGS في ملف التكوين الخاص بك، ثم إعادة تشغيل تكوين، وينبغي حل هذه المشكلة. (الإصدارات أباتشي 1.2. * وEXTRA_LFLAGS استخدام في وقت سابق بدلا من ذلك.)

ملاحظة: اعتبارا من BIND 8.1.1، يتم تثبيت مكتبات ربط والملفات تحت / البيرة / المحلية / ربط افتراضيا، لذلك يجب أن لا تصل الى هذه المشكلة. وينبغي أن كنت ترغب في استخدام حل له ربط سيكون لديك لإضافة التالية إلى خطوط كل منها:

EXTRA_CFLAGS = -I/usr/local/bind/include EXTRA_LDFLAGS = -L/usr/local/bind/lib EXTRA_LIBS =-lbind

أحصل على خطأ حول "تكوين فشل srclib / أبريل"

هذا لا ينطبق إلا على اباتشي 2.4 و في وقت لاحق

إذا كنت بناء مع الخيار - مع-شمل-APR، تحتاج أيضا إلى تحميل كتل القطران *-deps يطابق الافراج الرئيسية التي تحاول بناء، واستخراج عليه في نِفَسٌ الدليل.

لماذا لا أباتشي ترجمة مع نسخة نظام بلدي؟

إذا كان الملقم لن تجميع على النظام الخاص بك، وربما هو نتيجة لأحد الأسباب التالية:

السيناريو تكوين بيئة لا تعترف النظام الخاص بك.
وهذا قد يكون إما لأنه غير معروف تماما، أو لأنه لم يتم التعامل مع بيئة معينة (وتشمل الملفات، إصدار نظام التشغيل، وهلم جرا) بشكل صريح. إذا حدث هذا، قد تحتاج إلى منفذ الخادم لنظام التشغيل الخاص بك نِفَسٌ ك.
النظام الخاص بك C المترجم هو جمع ونقل النفايات.
بعض أنظمة التشغيل وتشمل مترجم C الافتراضية التي قد تكون غير متوافقة مع ANSI C أو يعاني من أوجه قصور أخرى. التوصية المعتادة في مثل هذه الحالات هو الحصول على وتركيب واستخدام دول مجلس التعاون الخليجي.
قد يتم الخلط بين الخاص بك تتضمن الملفات.
في بعض الحالات، وجدنا أن ترقية أو تثبيت نظام البرمجي قد ترك الملفات رأس C في حالة غير متناسقة. تأكد من أن شجرة الخاص يضم الدليل هو متزامنا مع مترجم ونظام التشغيل.
قد نظام التشغيل الخاص بك أو المترجم أن يكون للخروج من التنقيح.
بائعي البرامج (بما فيها تلك التي تطور أنظمة التشغيل) إصدار نشرات جديدة لسبب ما، وأحيانا لإضافة وظيفة، ولكن في كثير من الأحيان لتصحيح الأخطاء التي تم اكتشافها. محاولة رفع مستوى المترجم الخاص بك و / أو نظام التشغيل الخاص بك.
مجموعة أباتشي اختبارات القدرة على بناء الخادم على منصات مختلفة. لسوء الحظ، لا يمكننا اختبار كل من منصات نظام التشغيل هناك. إذا كنت قد تحققت من أن أيا من القضايا المذكورة أعلاه هو سبب المشكلة، وألا يكون قد ذكرت من قبل، ويرجى تقديم تقرير مشكلة. مما لا شك فيه لتشمل تفاصيل كاملة، مثل المترجم وإصدارات نظام التشغيل ورسائل الخطأ بالضبط.

لماذا أحصل على شكاوى حول إعادة تعريف "iovec البنية" عند ترجمة تحت لينكس؟

هذا هو صراع بين الخاص C مكتبة تضم وتضم النواة. كنت بحاجة للتأكد من أن تتم مطابقة إصدارات على حد سواء بشكل صحيح. هناك نوعان من الحلول، أي واحد سوف تحل المشكلة:

إزالة تعريف iovec البنية من مكتبة C الخاص بك يتضمن. وتقع في / البيرة / وتشمل / SYS / uio.h. أو،على خط EXTRA_CFLAGS في التكوين الخاص بك وإعادة تكوين / اعادة بناء إضافة DNO_WRITEV. هذا يضر الأداء ويجب استخدامه فقط كملاذ أخير.

أنا باستخدام دول مجلس التعاون الخليجي وأحصل على بعض أخطاء ترجمة، ما هو الخطأ؟

دول مجلس التعاون الخليجي بتوزيع الملفات رأس النظام وتنتج مجموعة فرعية تعديل الذي يستخدم لتجميع. هذا السلوك يربط بين دول مجلس التعاون الخليجي بإحكام على إصدار نظام التشغيل الخاص بك. هكذا، على سبيل المثال، إذا كنت تعمل IRIX 5.3 عند بني دول مجلس التعاون الخليجي ومن ثم الترقية إلى IRIX 6،2 في وقت لاحق، وسوف تضطر إلى إعادة بناء دول مجلس التعاون الخليجي. وبالمثل لسولاريس 2.4، 2.5، 2.5.1 أو عند الترقية إلى 2.6. في بعض الأحيان يمكنك كتابة "دول مجلس التعاون الخليجي-V"، وسوف اقول لكم نسخة من نظام التشغيل تم بناؤها ضد.

إذا فشلت في القيام بذلك، فمن المرجح جدا أن أباتشي ستفشل لبناء. أحد الأخطاء الأكثر شيوعا هو مع readv، writev، أو uio.h. هذه ليست علة مع اباتشي. وسوف تحتاج إلى إعادة تثبيت دول مجلس التعاون الخليجي.

رسائل د. سجل خطأ ومشاكل في بدء تشغيل أباتشي

لماذا أحصل على "setgid: الوسيطة غير صالحة" عند بدء التشغيل؟

التوجيه الخاص المجموعة (وربما في أسيوط / httpd.conf و) يحتاج لتسمية مجموعة موجودة فعلا في الملف / الخ / مجموعة (أو ما يعادلها النظام الخاص بك). كما أن هذه المشكلة ينظر في كثير من الأحيان عندما يتم استخدام رقم سالب في توجيه المجموعة (على سبيل المثال، "المجموعة # -1"). باستخدام اسم المجموعة - وليس عدد مجموعة - أن وجدت في قاعدة بيانات مجموعة النظام الخاص بك حل هذه المشكلة في جميع الحالات.

لماذا أحصل على "هتبد: لا يمكن وضع مأخذ TCP_NODELAY خيار" في سجل خطأ الخاص بي؟

هذه الرسالة دائما تقريبا يشير إلى أن العميل قبل قطع أباتشي وصلنا الى نقطة استدعاء setsockopt () للاتصال. فإنه لا ينبغي أن تحدث لأكثر من حوالي 1٪ من الطلبات الخادم يعالج، وانها استشارية فقط على أي حال.

لماذا أحصل على "إعادة الاتصال عن طريق الأقران" في سجل خطأ الخاص بي؟

هذه هي رسالة عادية وشيئا عن الذي ليشعروا بالذعر. وهو ما يعني ببساطة أن العميل إلغاء الاتصال قبل قد وضعتها تماما حتى - مثل من قبل المستخدم النهائي الضغط على "إيقاف" الزر. صبر الشعب يجري ما هو عليه، قد المواقع مع الاستجابة في الوقت مشاكل أو ارتباطات الشبكة بطيئة واجهت هذه أكثر من تلك القدرة العالية أو تلك مع أنابيب كبيرة على الشبكة.

ويقول errorlog أباتشي ملقاة الأساسية، ولكن أين هو ملف تفريغ؟

الرسالة سجل خطأ عن جوهر ملقاة يتضمن الدليل حيث ملف تفريغ يجب أن يكون موجودا. ومع ذلك، Unixes كثيرة لا تسمح للعملية التي ودعت setuid () لتفريغ الأساسية لأسباب أمنية ('هل هذا ما زالت مشكلة؟')؛ الإعداد أباتشي نموذجي لديه خادم بدأت كجذر لربط المنفذ 80، وبعد ذلك ويستخدم setuid () لتغيير UIDs لمستخدم غير المميز لخدمة الطلبات.

التعامل مع هذا النظام يعمل غاية محددة، وربما تتطلب إعادة بناء نواة النظام الخاص بك. راجع وثائق نظام التشغيل الخاص بك أو بائع للحصول على مزيد من المعلومات حول ما إذا كان النظام يفعل ذلك، وكيفية الالتفاف عليها. إذا كان هناك طريقة موثقة لتجاوز ذلك، فمن المستحسن أن يمكنك تجاوز ذلك فقط من أجل عملية HTTPD الخادم إذا كان ذلك ممكنا.

الموقع الكنسي عن الملفات الأساسية تفريغ اباتشي هو ServerRoot الدليل. ويمكن تعيين موقع عبر CoreDumpDirectory التوجيه إلى دليل مختلف. تأكد من أن هذا الدليل غير قابل للكتابة من قبل المستخدم والخادم يعمل على (خلافا للمستخدم بدء تشغيل الخادم كما هو).

عند تشغيل على لينكس أحصل على "shmget: لم يتم العثور على وظيفة"، فماذا أفعل؟

وقد تم بناء النواة من دون دعم IPC SysV. سيكون لديك لإعادة بناء نواة مع أن تمكين دعم (انها تحت عنوان "العام إعداد" قائمة فرعية). وثائق لبناء نواة هي خارج نطاق هذه التعليمات، يجب عليك استشارة HOWTO النواة، أو الوثائق المرفقة مع توزيعتك، أو لينكس قائمة الأخبار / البريدية. كحل أخير، يمكنك تعليق خارج # تعريف تعريف USE_SHMGET_SCOREBOARD في القسم لينكس من SRC / conf.h وإعادة بناء الخادم (قبل 1.3b4، وإزالة ببساطة تعريف # HAVE_SHMGET سيكون كافيا). هذا وسوف تنتج الخادم الذي هو أبطأ وأقل موثوقية.

توقف الخادم، أو فشل بدء، و / أو سجل خطأ يملأ مع "fcntl: F_SETLKW: لا يوجد سجل اقفال المتاحة" الرسائل أو ما شابه ذلك

هذه هي أعراض ملف مشكلة تأمين، والتي عادة ما يعني أن الخادم يحاول استخدام ملف التزامن على نظام الملفات NFS.

بسبب نموذج مواز، عملياتها، وخادم ويب أباتشي في حاجة إلى توفير شكل من أشكال التزامن عند الوصول إلى موارد معينة. واحد من هذه الأساليب تزامن ينطوي على اتخاذ اقفال على ملف، وهو ما يعني أن الملفات بارزون في lockfile يقيم يجب أن يعتمد تأمين. في كثير من الحالات يمكن أن يعني هذا أنه لا يمكن إبقاء على نظام الملفات NFS محمولة.

تسبب خادم الويب إلى العمل حول قيود قفل NFS، وتشمل خط مثل التالية في ملفات تكوين الملقم:


LockFile / فار / تشغيل / أباتشي للانغلاق
وينبغي أن لا يكون الدليل قابل للكتابة بشكل عام (على سبيل المثال، لا تستخدم / فار / TMP). راجع LockFile الوثائق لمزيد من المعلومات.

عندما أحاول بدء أباتشي من نافذة دوس، أحصل على رسالة مثل "لا يمكن تحديد اسم المضيف. استخدام الخادم التوجيه لتعيين يدويا." ماذا يعني هذا؟

فهو يعني ما يقول، والبرمجيات أباتشي لا يمكن تحديد اسم المضيف من النظام الخاص بك. تحرير أسيوط بك \ ملف httpd.conf، والبحث عن السلسلة " الخادم "، وتأكد من أن هناك توجيها uncommented مثل

الخادم المضيف المحليأو

الخادم www.foo.comفي الملف. تصحيح ذلك إذا كان هناك أحد هناك مع معلومات خاطئة، أو إضافة واحدة إذا لم يكن لديك بالفعل واحدة.

أيضا، تأكد من أن لديك نظام ويندوز وتمكين DNS. راجع مكون إعداد TCP / IP من شبكة الإنترنت أو لوحة التحكم خيارات.

بعد التحقق من أن يتم تمكين DNS وأن يكون لديك اسم المضيف في صالح الخاص بك الخادم التوجيه، في محاولة لبدء تشغيل الخادم مرة أخرى.

"حدث خطأ النظام 1067. تم إنهاء العملية بشكل غير متوقع." عندما أحاول بدء تشغيل اباتشي على ويندوز، وأحصل على رسالة مثل ماذا يعني هذا؟

هذه الرسالة يعني أن خادم الويب لم يتمكن من البدء بشكل صحيح لسبب أو لآخر. لمعرفة السبب، وتنفيذ الأوامر التالية في إطار DOS:

ج: مؤتمر نزع السلاح "\ ملفات البرنامج \ اباتشي مجموعة \ اباتشي" أباتشي
(ضرب إذا كنت لا تحصل على الجزء الخلفي الفوري، والتحكم C-تسبب أباتشي للخروج.)

وسوف ترى الخطأ من المحتمل أن يكون واحدة من تلك التي سبقت هذا السؤال في أسئلة وأجوبة.

أولا التحقق من الأحداث Windows NT سجل للأخطاء التطبيق باستخدام برنامج ويندوز NT/2000 حدث عارض. وسيتم تخزين أي الأخطاء التي تحدث قبل فتح سجل الخطأ أباتشي هنا، إذا تم تشغيل أباتشي ويهدف الى خدمة على NT أو 2000. كما هو الحال مع أي خطأ، والتحقق من السجل الخاص بك أيضا خطأ أباتشي.

على نظام لينكس سوزي، وأنا أحاول وتكوين لمراقبة الدخول باستخدام المصادقة الأساسية. على الرغم من أنني تحذو حذو بالضبط، فشل المصادقة، ورسالة خطأ "مشرف: لا قوات الدفاع الوطني صالحة: ...". يتم تسجيل.

في توزيع سوزي، وقد أضيفت إضافية مصادقة طرف 3 وحدات وتفعيلها من خلال التقصير. هذه الوحدات تتداخل مع وحدات قياسية أباتشي وتسبب المصادقة الأساسية للفشل. توصية لدينا هو أن أعلق كل هذه الوحدات في / الخ / httpd / suse_addmodule.conf و / الخ / httpd / suse_loadmodule.conf التي ليست مطلوبة في الواقع لتشغيل الخادم الخاص بك.

لماذا أتلقى رسائل الخادم إعادة دوريا، عندما لم أكن إعادة تشغيل الملقم؟

المشكلة: أنت يلاحظ رسائل إعادة التشغيل في سجل خطأ الخاص بك، وبشكل دوري، عندما كنت أعلم أنك لم إعادة تشغيل الملقم نِفَسٌ ك:


[خميس 6 يونيو 04:02:01 2002] تلقى [إشعار] SIGHUP. محاولة إعادة تشغيل
[خميس 6 يونيو 04:02:02 2002] [إشعار] أباتشي تكوين - استئناف العمليات العادية
فحص وظائف كرون لمعرفة عندما / إذا سجلات الخادم الخاص بك ويجري تدويرها. قارن ذلك الوقت من تناوب على خطأ وقت الرسالة. إذا كانت هي نِفَسٌ ها، يمكنك بأمان إلى حد ما تفترض أن إعادة التشغيل ومن المقرر أن خادم بتسجيل تناوبت.

لماذا أحصل على "وحدة نمطية الوحدة النمطية اسم غير متوافق مع هذا الإصدار من طراز أباتشي" رسائل في سجل خطأ الخاص بي؟

وحدة الرقم السحري (MMN) هو ثابت المعرفة في مصدر أباتشي مقترن التوافق ثنائي من وحدات. يتم تغييره عندما الهياكل الداخلية أباتشي، والمكالمات وظيفة وأجزاء كبيرة أخرى من API تغيير في مثل هذه الطريقة التي لا يمكن أن توافق ثنائي يمكن ضمان أي أكثر. بشأن تغير MMN، جميع وحدات طرف ثالث يجب أن تكون على الأقل معاد، وأحيانا قليلا حتى تغير من أجل العمل مع الإصدار الجديد من طراز أباتشي.

اذا كنت تريد الحصول على رسائل الخطأ أعلاه، اتصل ببائع من وحدة لثنائي جديد، أو ترجمة عليه إذا كان لديك الوصول إلى شفرة المصدر.

أسئلة تكوين E.

لماذا لا أستطيع تشغيل أكثر من المضيفين الظاهري <N>؟

كنت تشغل على الأرجح إلى محدودية الموارد في نظام التشغيل الخاص بك. الحد الأكثر شيوعا هو الحد لكل عملية على واصف ملف، والذي هو دائما تقريبا سبب مشاكل النظر عند إضافة المضيفين الظاهري. أباتشي في كثير من الأحيان لا يعطي رسالة خطأ بديهية لأنه عادة ما يكون بعض روتين مكتبة (مثل ل gethostbyname ()) التي تحتاج إلى واصف ملف ولا يشكو intelligibly عند فإنه لا يمكن الحصول عليها.

كل ملف السجل يتطلب واصف الملف، مما يعني أنه إذا كنت تستخدم وصول منفصلة وسجلات الخطأ لكل المضيف الظاهري، كل مضيف ظاهري يحتاج اصفات ملف اثنين. كل توجيهات استماع يحتاج أيضا على واصف ملف.

القيم النموذجية ل<N> التي شهدناها هي في حدود 1024 أو 2048. عندما المطبات الخادم في ملف الحد اصف، قد تفريغ الأساسية مع SIGSEGV، فإنه قد يتعطل فقط، أو أنه قد عرج على طول وسترى (ذات مغزى ربما) أخطاء في سجل خطأ. مشكلة واحدة المشتركة التي تحدث عند تشغيل في ملف الحد اصف هو أن يوقف تنفيذ نصوص CGI بشكل صحيح.

على ما يمكنك القيام به حيال ذلك:

خفض عدد استمع توجيهات
إذا لم تكن هناك خوادم أخرى تعمل على الجهاز على نِفَسٌ المنفذ ثم تقوم عادة لا تحتاج إلى أي استمع توجيهات على الإطلاق. افتراضيا أباتشي يستمع الى جميع العناوين على المنفذ 80.
تخفيض عدد ملفات السجل
يمكنك استخدام mod_log_config لتسجيل جميع الطلبات إلى ملف سجل واحد في حين بما في ذلك اسم المضيف الظاهري في ملف السجل. يمكنك كتابة السيناريو ثم لتقسيم ملف السجل إلى ملفات منفصلة في وقت لاحق إذا لزم الأمر. ويرد مثل هذا السيناريو مع توزيع أباتشي في SRC / الدعم / تقسيم ملف التسجيل ملف.
زيادة عدد واصفي ملف المتاحة للخادم
(راجع وثائق النظام الخاص بك في الحد أو أوامر ulimit). بالنسبة لبعض النظم، ومعلومات عن كيفية القيام بذلك يتوفر في أداء تلميحات صفحة. هناك مذكرة محددة لفري أدناه.
"لا تفعل ذلك" - محاولة تشغيل عدد أقل من الجنود مع الظاهرية
نشر العملية الخاصة بك عبر العمليات خادم متعددة (باستخدام استمع على سبيل المثال، ولكن انظر النقطة الأولى) و / أو الموانئ. وبما أن هذا هو الحد من نظام التشغيل، ليس هناك الكثير آخر متاح في طريق الحلول.

لماذا لا عملي ErrorDocument 401؟

أنت في حاجة لاستخدامها مع URL في النموذج "/ فو / شريط" وليس واحد مع أسلوب واسم المضيف مثل " http://host/foo/bar ". راجع ErrorDocument ثائق للحصول على التفاصيل. وقد تم توثيق هذا بشكل غير صحيح في الماضي.

لماذا اباتشي إرسال ملف على كل ذلك؟

أباتشي لا يرسل تلقائيا ملف على كل ردا على ذلك، إلا إذا قمت بإعادة تجميعها مع وحدة mod_usertrack، ومكن ذلك بشكل خاص مع CookieTracking التوجيه. هذه الوحدة قد تساعد المستخدمين على المسار، ويستعمل الكوكيز للقيام بذلك. إذا كنت لا تستخدم البيانات الناتجة عن mod_usertrack، لا ترجمة عليه في أباتشي.

لماذا لا الكوكيز العمل؟

اباتشي HTTPD يمر على رأس تعيين كوكي الخاص بك، مثل أي رأس أخرى. إذا الكوكيز لا تعمل وسوف يكون ذلك بسبب السيناريو الخاص بك لا يعمل بشكل صحيح أو متصفحك لا تستخدم الكوكيز أو لم يتم تعيين المتابعة لقبولهم.

كيف يمكنني إضافة برامج التصفح والمشيرين إلى سجلاتي؟

اباتشي يوفر عدة طرق مختلفة للقيام بذلك. الأسلوب المستحسن هو تجميع وحدة mod_log_config في التكوين الخاص بك واستخدام CustomLog التوجيه.

يمكنك تسجيل الدخول إما على معلومات إضافية في ملفات أخرى من السجل الخاص بك نقل عادي، أو يمكنك إضافتها إلى سجلات بالفعل مكتوب. على سبيل المثال:

CustomLog سجلات / access_log "ح٪٪٪ ل ش ر٪ \"٪ ص \ "٪ S٪ ب \"٪ {المرجعية} أنا \ "\"٪ {عامل المستخدم} أنا \ ""

وهذا إضافة قيم وكيل المستخدم: والمرجعية: رؤوس، والتي تشير إلى العميل وتشير صفحة، على التوالي، في نهاية كل سطر في سجل وصول.

قد ترغب في الإطلاع على مقال الاسبوع أباتشي بعنوان: "معلومات الزوار اللقاء: تخصيص وغفيليس الخاص بك" .

لماذا الدلائل الوصول إلى العمل إلا عندما تتضمن زائدة "/" (على سبيل المثال، http://foo.domain.com/ ~ / المستخدم) ولكن ليس عندما حذفت منه (على سبيل المثال، http://foo.domain.com/ ~ عَضّوِ)؟

عند الوصول إلى الدليل من دون "/" زائدة، أباتشي بحاجة إلى إرسال ما يسمى إعادة توجيه إلى العميل ليقولوا ذلك لإضافة خط مائل زائدة. اذا لم تفعل ذلك، فإن عناوين URL النسبية لا تعمل بشكل صحيح. عندما يرسل إعادة توجيه، فإنه يحتاج إلى معرفة اسم الملقم بحيث يمكن إدراجه في إعادة توجيه. هناك طريقتان للاباتشي لمعرفة ذلك، فإما أنه يمكن تخمين، أو يمكن أن أقول لكم ذلك. إذا تم تكوين DNS بشكل صحيح، فإنه يمكن تخمين عادة من دون أي مشاكل. إذا لم يكن، مع ذلك، فأنت بحاجة لمعرفة ما.

إضافة الخادم التوجيه إلى ملف التكوين ليقولوا ذلك ما اسم المجال من الملقم.

الشيء الآخر الذي يمكن أن يسبب أحيانا هذا العرض هو سوء فهم من Alias ​​التوجيهي، مما أدى إلى اسم مستعار العمل بخط مائل زائدة، وليس من دون واحدة. Alias ​​التوجيهي حرفية جدا، والأسماء المستعارة ما كنت اقول له. النظر في المثال التالي:

الاسم المستعار / المثال / / الوطن / على شبكة الاتصالات العالمية / المثال /
التوجيه يخلق فوق اسم مستعار لعناوين المواقع التي تبدأ ب / المثال /، ولكن لا اسم مستعار عناوين المواقع بدءا من / سبيل المثال. وهذا يعني، عنوان URL مثل http://servername.com/example/ ستحصل على المحتوى المطلوب، ولكن URL مثل http://servername.com/example سوف يؤدي إلى خطأ "الملف غير موجود".

الاسم المستعار التالية، من ناحية أخرى، سوف تعمل لكلتا الحالتين:

الاسم المستعار / المثال / الوطن / على شبكة الاتصالات العالمية / مثال
لماذا لا تسرد mod_info أي توجيهات؟

وحدة mod_info يتيح لك استخدام مستعرض ويب لمعرفة كيفية تكوين الخادم الخاص بك. من بين المعلومات التي تعرض لائحة وحدات وتوجهاتها التكوين. "التيار" القيم لتوجيهات ليست بالضرورة تلك التي من الخادم الذي يقوم بتشغيل، يتم استخراج هم من ملفات التكوين أنِفَسٌ هم في ذلك الوقت من هذا الطلب. إذا تم تغيير الملفات منذ أن تم شحنها مشاركة الخادم، والعرض لا تتطابق مع القيم بنشاط في الاستخدام. إذا كانت الملفات والمسار إلى ملفات ليست للقراءة من قبل المستخدم والذي كان الملقم قيد التشغيل (انظر توجيه المستخدم)، ثم يمكن mod_info لم يقرأ لهم من أجل إدراج قيمها. وسوف تتاح إدخال في سجل خطأ في هذا الحدث، ولكن.

يتم تجاهل بلدي. ملفات هتكس.

هذا هو دائما تقريبا بسبب الخاص AllowOverride التوجيه التي يجري وضعها بشكل غير صحيح عن الدليل في المسألة. وإذا تم تعيينها إلى لا شيء بعد ذلك. لا ملفات تاكيس حتى يتم النظر ل. هذا أمر جيد. إذا كان لديك الوصول إلى تحرير httpd.conf و، يجب عدم استخدام الملفات. تاكيس، من أي وقت مضى. إذا كان الزبائن بحاجة لدعم تاكيس، تأكد من أن AllowOverride يتم تعيين إلى شيء معقول (أي: لم يكن كلها).أن تكون على يقين أنه يغطي الدليل الذي تحاول استخدام ملف htaccess. فيها ويتم إنجاز هذا عادة عن طريق ضمان فمن داخل الحاوية الدليل الصحيح.

يمكنك معرفة ما إذا كان هذا هو المشكلة عن طريق إضافة نص هراء إلى ملف htaccess الخاص بك. وإعادة تحميل الصفحة. إذا كنت لا تحصل على خطأ في الخادم، ثم اباتشي HTTPD لم يتم قراءة ملف htaccess الخاص بك.

لماذا أحصل على "المحرمة" الرسالة كلما أحاول الوصول إلى دليل معين؟

ويتسبب عادة هذه الرسالة لأنه إما

نظام الملفات الأساسية أذونات لا تسمح للمستخدم / مجموعة تحت أباتشي التي يعمل للوصول إلى الملفات الضرورية، أو
تكوين أباتشي لديها بعض القيود المفروضة على الوصول في المكان الذي يمنع الوصول إلى الملفات.
يمكنك تحديد هذه الحالة تنطبق على الوضع الخاص بك عن طريق التحقق من سجل خطأ.

في الحالة التي يكون فيها ملف إذن النظام هي على خطأ، انظر (13) الإذن مرفوض لمزيد من المعلومات.

لماذا ملفاتي تظهر بشكل صحيح في Internet Explorer، ولكن كما تظهر مصدر أو يؤدي الى نافذة الحفظ مع نتسكيب، أو، لماذا لا إنترنت إكسبلورر تجعل النص الخاص بي / وثيقة واضحة بشكل صحيح؟

مرض التصلب العصبي المتعدد إنترنت إكسبلورر (MSIE) ونتسكيب التعامل مع الكشف عن نوع MIME بطرق مختلفة، وبالتالي سيتم عرض هذه الوثيقة بشكل مختلف. على وجه الخصوص، أي يعتمد أحيانا على امتداد الملف أو محتويات الملف لتحديد نوع MIME. وهذا يمكن أن يحدث عندما يكون الملقم يحدد نوع MIME التطبيق / الثماني، تيار أو النص / عادي. هذا السلوك يشكل انتهاكا لمعيار HTTP ويجعل من المستحيل لتسليم وثائق نص عادي إلى MSIE العملاء في بعض الحالات. مزيد من التفاصيل متاحة على MSIE في نوع MIME سلوك كشف في مقال MSDN ومذكرة من قبل آلان ج. فلافيل.

أفضل يمكنك القيام به كمسؤول خادم لتكوين بدقة نوع MIME من المستندات الخاصة بك عن طريق تحرير ملف mime.types أو باستخدام AddType التوجيه في ملفات التكوين أباتشي. في بعض الحالات، قد تكون قادرة على خداع MSIE إلى تقديم النص / وثائق واضحة بشكل صحيح عن طريق ضمان لديهم ملف TXT. تمديد، ولكن هذا لن ينجح إذا MSIE يعتقد أن محتوى يبدو وكأنه نوع ملف آخر.

موقعي هو الوصول تحت أسماء المضيفين كثيرة مختلفة، وكيف يمكنني توجيه العملاء، بحيث ترى سوى اسم واحد؟

كثير من المواقع تعيين مجموعة متنوعة من أسماء المضيفين إلى نفس المضمون. على سبيل المثال، قد www.example.com، example.com وwww.example.net تشير جميعها إلى نِفَسٌ الموقع. فمن الأفضل للتأكد من أنه، بغض النظر عن اسم استخدام العملاء للوصول إلى الموقع، وسيتم توجيهها إلى اسم المضيف، واحدة الكنسي. هذا يجعل الموقع أسهل للحفاظ على ويؤكد أنه سيكون هناك إصدار واحد فقط من موقع في مخابئ وكيل ومحركات البحث.

هناك نوعان من التقنيات لتنفيذ أسماء المضيفين الكنسي:

استخدام mod_rewrite كما هو موضح في "الكنسي أسماء مضيفين" من دليل إعادة كتابة عنوان.

انظر http://httpd.apache.org/docs/current/rewrite/rewrite_guide.html # canonicalurl .

استخدم اسم القائم على استضافة الظاهري:

NameVirtualHost *: 80
<VirtualHost *:80>
الخادم www.example.net
ServerAlias ​​example.com
إعادة توجيه دائم / http://www.example.com/
</ VirtualHost>

<VirtualHost *:80>
www.example.com الخادم
DocumentRoot / البيرة / المحلية / اباتشى / htdocs
</ VirtualHost>
لماذا يمكنني الوصول إلى موقع الويب الخاص بي من الملقم أو من شبكة الاتصال المحلية، ولكن أنا لا يمكن الوصول إليه من أي مكان آخر على شبكة الإنترنت؟

هناك العديد من الأسباب المحتملة لهذا، وتقريبا وترتبط كل منها لتكوين الشبكة الخاصة بك، وليس تكوين خادم HTTP أباتشي. واحدة من المشاكل الأكثر شيوعا هو أن جدار الحماية بحظر الوصول إلى الافتراضي HTTP المنفذ 80. على وجه الخصوص، مزودي خدمات الإنترنت المستهلك العديد من منع الوصول إلى هذا المنفذ. يمكنك معرفة ما إذا كان هذا هو الحال من خلال تغيير أي ميناء واستمع توجيهات في httpd.conf و لاستخدام المنفذ 8000 ومن ثم طلب موقع الخاص http://yourhost.example.com:8000/ . (وبطبيعة الحال، قد جدار حماية تقييدية جدا منع هذا المنفذ كذلك.)

كيف يمكنني تشغيل قوائم الدليل التلقائي أو إيقاف تشغيله؟

إذا طلب العميل URL الذي يعين الدليل والدليل لا يحتوي على اسم الملف الذي يطابق DirectoryIndex التوجيه، ومن ثم يمكن تكوين mod_autoindex لتقديم قائمة من محتويات الدليل.

لتشغيل دليل الفهرسة الآلية، والعثور على توجيه الخيارات التي تنطبق على الدليل وإضافة الكلمة فهارس. على سبيل المثال:

<Directory /path/to/directory>
خيارات + فهارس
</ دليل>
لإيقاف تلقائي الفهرسة الدليل، وإزالة الكلمة فهارس من سطر الخيارات المناسبة. لإيقاف سرد الدليل للحصول على دليل فرعي معين، يمكنك استخدام خيارات، فهارس. على سبيل المثال:

/path/to/directory> <Directory
خيارات، فهارس
لماذا بلادي خيارات توجيهات لا يكون لها الأثر المطلوب؟

وتطبق التوجيهات وضعت في ملفات التكوين في ترتيب معين للغاية، كما وصفها كيف عمل أقسام دليل، الموقع، والملفات . وبالإضافة إلى ذلك، فإن كل الخيارات التوجيه له تأثير إعادة الخيارات مقابل لا شيء قبل إضافة خيارات معينة (ما لم يكن فقط "+" و "-" تستخدم الخيارات). والنتيجة هي أن الخيارات المحددة في الخادم الرئيسي أو الظاهرية السياق المضيف (خارج أي دليل، والمكان، أو قسم الملفات) وعادة ما يكون له تأثير، لأنها تجاوز أكثر التوجيهات خيارات محددة. على سبيل المثال، في ما يلي


/usr/local/apache/htdocs> <Directory
خيارات فهارس
خيارات تشمل ExecCGI
ويتضمن ExecCGI ستكون ثماره في البيرة / / المحلية / اباتشى / htdocs الدليل.

يمكنك تجنب المشاكل من خلال ايجاد عادة إما توجيه الخيارات التي تنطبق بالفعل على دليل محدد وتغييرها، أو عن طريق وضع الخاص بك خيارات التوجيه داخل القسم <Directory> ممكن الأكثر تحديدا.

كيف يمكنني تغيير المعلومات التي أباتشي الإسترجاع عن نِفَسٌ ها في رؤوس؟

عندما يتصل عميل إلى أباتشي، وهي جزء من المعلومات التي تم إرجاعها في رؤوس هو اسم "اباتشي" للمزيد من المعلومات التي يمكن إرسالها هو رقم الإصدار، مثل "2.2.17"، نظام التشغيل، وقائمة غير الوحدات القياسية التي قمت بتثبيتها.

على سبيل المثال:

الخادم: Apache/2.2.17 (يونيكس) mod_perl/1.26 في كثير من الأحيان، الناس يريدون إزالة هذه المعلومات، في ظل فهم خاطئ أن يؤدي ذلك إلى جعل النظام أكثر أمانا. وربما هذا هو ليس كذلك، كما من المرجح أن يستغل نِفَسٌ ه يكون حاول بغض النظر عن المعلومات التي توفرها رأس.

هناك، ومع ذلك، واثنين من الاجابات على هذا السؤال: الجواب الصحيح، والجواب الذي كنت تبحث على الأرجح ل.

الإجابة الصحيحة على هذا السؤال هو أنه يجب عليك استخدام ServerTokens التوجيه لتغيير كمية المعلومات التي يتم تمريرها في رؤوس. وسوف يحدد هذا التوجيه لحث تمرير كمية أقل قدر ممكن من المعلومات:

الخادم: أباتشي الجواب ربما كنت تبحث عنه هو كيفية جعل أباتشي يكذب بشأن ما ما هو عليه، أي إرسال شيء من هذا القبيل:

الخادم: خادم بوب HTTPD سعيد من أجل القيام بذلك، سوف تحتاج إلى تعديل التعليمات البرمجية المصدر أباتشي وإعادة بناء أباتشي. لا ينصح بذلك، لأنه بات من شبه المؤكد أن لا توفر لك الأمن وأضاف كنت تعتقد أنك تكتسب. يتم ترك بالضبط طريقة للقيام بذلك باعتبارها ممارسة للقارئ، كما أننا لسنا حريصين على مساعدتك في القيام بشيء ما هي في جوهرها فكرة سيئة.

لماذا أرى طلبات للحصول على المواقع الأخرى التي تظهر في ملفات السجل الخاص بي؟

ويمكن إدخال access_log تظهر هذه الحالة تبدو مثل هذا:

63.251.56.142 - [25/Jul/2002: 00:48:04 -0700] "GET http://www.yahoo.com/ HTTP/1.0 "200 1456والسؤال هو: لماذا طلب www.yahoo.com تأتي إلى الخادم الخاص بك بدلا من خادم ياهو؟ ولماذا يكون الرد على رمز حالة 200 (النجاح)؟

هذا هو عادة نتيجة للعملاء محاولة خبيثة لاستغلال خوادم بروكسي مفتوحة للوصول إلى موقع على شبكة الانترنت دون الكشف عن مواقعها الحقيقية. إذا وجدت مثل هذه القيود في السجل الخاص بك، فإن أول شيء فعله هو التأكد من انك صحيح تكوين الخادم الخاص بك ليس إلى وكيل لعملاء غير معروف. إذا كنت لا تحتاج إلى توفير خادم وكيل في كل شيء، يجب أن أؤكد ببساطة أن ProxyRequests لم يتم تعيين التوجيه في. إذا كنت لا تحتاج إلى تشغيل ملقم وكيل، ثم يجب عليك التأكد من الحصول على الخادم الخاص بك بشكل صحيح بحيث عملاء المخولين فقط يمكن استخدامها.

إذا تم تكوين الخادم الخاص بك بشكل صحيح، ثم محاولة من خلال وكيل الخادم الخاص بك فشل. إذا كنت ترى رمز حالة من 404 (لم يتم العثور على ملف) في السجل، ثم أنت تعلم أن فشل الطلب. إذا كنت ترى رمز الحالة 200 (نجاح)، وهذا لا يعني بالضرورة أن محاولة الوكيل نجحت. RFC2616 قسم 5.1.2 ولذلك يجب ان تقبل طلبات اباتشي مع عناوين المواقع المطلقة في URI-الطلب، حتى بالنسبة لغير الوكيل الطلبات. منذ أباتشي لا يوجد لديه طريقة لمعرفة جميع الأسماء المختلفة التي قد تكون معروفة خادم تحت، فإنه لا يمكن رفض ببساطة أسماء مضيفين أنها لا تعترف. بدلا من ذلك، وسوف تخدم طلبات للحصول على مواقع غير معروف محليا من ملابسه واستخدام اسم المضيف الملقم الافتراضي أو المضيف الظاهري. لذلك يمكنك مقارنة حجم الملف (1456 في المثال أعلاه) إلى حجم ملف المناظرة في الملقم الافتراضي الخاص بك. إذا كانت هي نِفَسٌ ها، ثم محاولة الوكيل فشلت، منذ أن تم تسليم وثيقة من الخادم الخاص بك، وليس وثيقة من www.yahoo.com.

إذا كنت ترغب في منع هذا النوع من الطلب تماما، فأنت بحاجة للسماح للأباتشي معرفة ما أسماء المضيفين لقبول ورفض ما أسماء المضيفين. يمكنك القيام بذلك عن طريق تكوين المضيفين الاسم الظاهري، حيث تستضيف الأولى المذكورة هو المضيف الافتراضي الذي سوف الصيد ورفض أسماء المضيفين غير معروف. على سبيل المثال:


NameVirtualHost *: 80

<VirtualHost *:80>
default.only الخادم
<Location />
طلب السماح، ورفض
كل من رفض
</ الموقع>
</ VirtualHost>

<VirtualHost *:80>
الخادم realhost1.example.com
alias1.example ServerAlias. كوم alias2.example.com
DocumentRoot / path/to/site1
</ VirtualHost>
...
واو المحتوى الديناميكي (CGI، ومباحث أمن الدولة)

كيف يمكنني تمكين تنفيذ CGI في الدلائل الأخرى من ScriptAlias؟

أباتشي تسلم جميع الملفات في دليل اسمه باعتباره scriptalias التي كونها مؤهلة للتنفيذ بدلا من تجهيز وثائق عادية. وينطبق هذا بغض النظر عن اسم الملف، لذلك مخطوطات في scriptalias التي لا تحتاج إلى دليل الكشف عن اسمه "*. CGI" أو "*. رر" أو أيا كان. وبعبارة أخرى، كافة الملفات في scriptalias التي هي دليل النصوص، بقدر ما تشعر بالقلق أباتشي.

لإقناع أباتشي لتنفيذ البرامج النصية في مواقع أخرى، مثل في الدلائل حيث الوثائق العادية قد يعيش أيضا، يجب أن يقولوا ذلك كيفية التعرف عليهم - وأيضا على أنه لا بأس من تنفيذها. لهذا، تحتاج إلى استخدام ما يشبه AddHandler التوجيه.

في القسم المناسب من الملفات تكوين الملقم، إضافة خط مثل AddHandler CGI-النصي. CGIسيقوم الملقم ثم تعترف أن جميع الملفات الموجودة في هذا الموقع (وتنحدر منها المنطقية) التي تنتهي في. "CGI" هي ملفات البرنامج النصي، وليس وثائق.

تأكد من أن يتم تغطيتها من قبل موقع الدليل إعلانا الخيارات التي تتضمن خيار ExecCGI. في بعض الحالات، قد لا ترغب في السماح فعلا جميع الملفات المسماة "*. CGI" لتكون قابلة للتنفيذ. ربما كل ما تريد هو تمكين ملف معين في دليل الطبيعي أن تكون قابلة للتنفيذ. ويمكن إنجاز هذا بدلا من ذلك عن طريق mod_rewrite والخطوات التالية:

إضافة محليا إلى ملف htaccess المقابلة من مجموعة الأوامر مشابهة لهذه واحدة.:

RewriteEngine على
RewriteBase ~ / فو / شريط /
. RewriteRule ^ quux \ CGI $ - [T = التطبيق / x-هتبد-CGI]
تأكد من أن يتم تغطيتها من قبل موقع الدليل إعلانا الخيارات التي تتضمن ExecCGI و FollowSymLinks خيار.

ماذا يعني عندما سى جي آي إس بي تفشل مع "من السابق لأوانه نهاية رؤوس السيناريو"؟

هذا يعني فقط ما تقول: خادم كانت تتوقع مجموعة كاملة من رؤوس HTTP (واحد أو أكثر متبوعا سطر فارغ)، ولم يحصل عليها.

السبب الأكثر شيوعا لهذه المشكلة هو البرنامج النصي يموتون قبل إرسال مجموعة كاملة من رؤوس، أو ربما أي في كل شيء، إلى الخادم. لنرى ما اذا كان هذا هو الحال، حاول تشغيل مستقل النصي من جلسة تفاعلية، بدلا من أن يكون السيناريو ضمن الملقم. اذا كان لديك رسائل الخطأ، وهذا يكاد يكون من المؤكد ان سبب "نهاية مبكرة من رؤوس النصي" رسالة. حتى لو كان CGI يعمل غرامة من سطر الأوامر، تذكر أن البيئة وأذونات قد تكون مختلفة عندما تعمل تحت خادم الويب. يمكن فقط الوصول إلى موارد CGI يسمح للمستخدم ومجموعة المحدد في التكوين الخاص بك اباتشي. وبالإضافة إلى ذلك، فإن البيئة لا يكون هو نِفَسٌ ه واحد
الرجوع الى أعلى الصفحة اذهب الى الأسفل
 
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» يمكن تخصيصها من خلال كتابة "وحدات" باستخدام وحدة اباتشي API
» أباتشي خادم HTTP الإصدار 2.0
» نصائح لكل زوجه وربي مثل الذهب
» برنامج CleanMyPC Registry Cleaner منظف الكمبيوتر من الشوائب ومخلفات الانترنت ومخلفات البرامج فهو اول مايقوم به مسح
» لماذا يضع الرسول يده تحت خده؟؟؟

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
موقع بوابة بلاد الشام ،belad-alsham :: lkj]dhj fgh] hgahl :: منتديات الشام بلادي :: منتدي الربح من الإنترنت Make Money From The InterNet :: منتدى أباتشي google.com Apache ،Binding-
انتقل الى:  
دخول
اسم العضو:
كلمة السر:
ادخلني بشكل آلي عند زيارتي مرة اخرى: 
:: لقد نسيت كلمة السر
تبادل اعلاني

مساحة اعلانية
مواقع صديقة
Feedage.com RSS
Feedage Grade B rated
!-- Feedage.com RSS Feed Tracking
Preview on Feedage: %D9%85%D9%88%D9%82%D8%B9-%D8%A7%D9%87%D9%84-%D8%A7%D9%84%D8%B4%D8%A7%D9%85- Add to My Yahoo! Add to Google! Add to AOL! Add to MSN
Subscribe in NewsGator Online Add to Netvibes Subscribe in Pakeflakes Subscribe in Bloglines Add to Alesti RSS Reader
Add to Feedage.com Groups Add to Windows Live iPing-it Add to Feedage RSS Alerts Add To Fwicki
Meta Tag Analyzer

Meta Tag Analyzer

عدد زوار بلاد الشام
Free counter and web stats
المواضيع الأخيرة
» تحميل برنامج البروكسي
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالأحد أكتوبر 12, 2014 7:13 am من طرف heba fathy

» سوريا المحتلة العرب
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالأحد أكتوبر 28, 2012 3:32 am من طرف يعقوب محمد

» الطفولة تتفض.. ( من اطفال العراق الى اطفال سوريا المحتلة ) .. جراحاتكم نعيشها
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالأربعاء أكتوبر 10, 2012 4:23 am من طرف يعقوب محمد

» من الذي اساءة للنبي الكريم ياقتلة الشعب السوري ؟؟؟
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالجمعة سبتمبر 21, 2012 4:36 am من طرف يعقوب محمد

» ModemMAX , برنامج ModemMax , تسريع الانترنت , برامج تسريع الاتصال , زيادة سرعة الاتصال , سرعة الاتصال , تحميل برنامج ModemMAX , برنامج ModemMAX الجديد , برنامج ModemMAX كامل مجانا , download ModemMAX
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء سبتمبر 18, 2012 3:31 pm من طرف rakan-jordan

» S.S.N-تصريحات هامة للعقيد عبدالجبار العكيدي 25-8.mp4
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء سبتمبر 18, 2012 3:27 pm من طرف rakan-jordan

» الرباعية تسعى لمنظور مشترك حول سوريا المحتلة
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء سبتمبر 18, 2012 3:26 pm من طرف rakan-jordan

» استشهاد 142 شخص مقتل 40 عنصر من “جيش الاسادي” في سوريا المحتلة
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء سبتمبر 18, 2012 3:25 pm من طرف rakan-jordan

» نورا الجيزاوي حرة: سمعت بدموع الفرح واليوم تذوقت لذتها on 2012/09/18 09:57 / لا يوجد اي تعليق منذ نعومة أظفاري و أنا بسمع “بدموع الفرح” بس لليوم لحتى تذوقت لذتهم ♥ الله لا يحرم حدا هالشعور يااااا
لماذا لا يمكنني نشر إلى خادم اباتشي بي باستخدام وضعت على الذهب نتسكيب وغيرها من البرامج؟ Emptyالثلاثاء سبتمبر 18, 2012 3:24 pm من طرف rakan-jordan

سحابة الكلمات الدلالية
الريف الرحيل والنشر يترتب اللبناني الطبع الاول عليه غليص حقوق وخيمة بدون مالك إساءة الجزء انتهاك يحدث