How to access Apache / PHP logs

Procédure

On an LWS Panel web hosting plan, your site’s logs (access logs, PHP errors, requests blocked by the ModSecurity firewall) can be viewed in the LWS Log Analyzer tool. You open it from the “Logs Apache PHP ModSecurity” icon in the “Databases & PHP” section. It displays logs in real time, over a period ranging from 24 hours to 7 days, and lets you download raw access logs.

Open LWS Log Analyzer

  1. Open your hosting management page

    In your LWS customer area, under the “Domain(s) & Hosting(s)” tab, click “Manage” next to the hosting plan concerned. If you cannot log in, see the help article How do I log in to my LWS account and resolve login issues?

  2. Click “Logs Apache PHP ModSecurity”

    In the “Databases & PHP” section, click the “Logs Apache PHP ModSecurity” icon.

    How to access Apache / PHP logs

    The LWS Log Analyzer tool opens on a server-specific address for your hosting plan, not on panel.lws.fr. To return to the panel, use the arrow at the top left.

  3. Follow the guided tour on first opening

    The first time, a 4-step guided tour asks you to choose the language (“Français” or “English”) and then introduces the tool. Click “Next” until “Let's go!”, or click “Skip” to close it.

Understanding the LWS Log Analyzer screen

At the top of each page, you will find the same settings:

  • the tabs: “Access & Errors”, “PHP Errors”, “Mod Security (WAF)”, “Cache”, “PHP-FPM” and “Protection”;
  • the period: “24h” (default), “Last 48h”, “Last 4 days” or “Last 7 days”;
  • the domain list: “All domains” by default, or a single site or subdomain of the hosting plan;
  • the search field, the “Refresh” button and the “✨ AI Analysis” button, which analyzes the displayed page.

The logs update automatically, about every 15 seconds (indicated by “Auto-refresh” at the top of the screen). Each indicator has a “?” explaining what it counts.

How to access Apache / PHP logs

Access & Errors: visits to your site

This tab replaces the old access log (access.log). It lists all requests made to your site by visitors and bots: counters by response type (2XX success, 3XX redirect, 4XX client, 5XX server, error rate), chart of requests per hour, most frequent IP addresses, pages and countries. The “4xx” and “5xx” filters keep only errors; the “> 1s”, “> 2s” and “> 5s” filters keep slow requests.

Each row in the table shows the date, the visitor’s IP address, the method (GET to display a page, POST for a form submission or login), the requested address, the response code, the size and the duration.

PHP Errors: errors in your code

This tab replaces the old PHP log (PHP.log). It counts errors by severity: “FATAL / PARSE” (critical errors that block the page), “WARNING”, “NOTICE”, “DEPRECATED” (obsolete functions). It also shows the most problematic files.

How to access Apache / PHP logs

In the table, the “All”, “Fatal”, “Warning”, “Notice” and “Deprecated” filters sort the errors. The “PHP FILE” and “LINE” columns indicate where the error occurs, and the “MESSAGE” column gives the exact text.

How to access Apache / PHP logs

Mod Security (WAF): requests blocked by the firewall

This tab replaces the old ModSecurity log (ModSecurity.log). It counts blocked attacks and lists, for each request, the IP address, the target address, the rule number triggered and the “🚫 Blocked” status. A visitor whose request is blocked by a rule receives a 406 error. The “🚫 Blocked only” button hides the rest. Many blocked requests to /.env or /.git/config from foreign addresses are bots looking for secret files: this is normal.

How to access Apache / PHP logs

Firewall settings are not configured here: they are found in the “Mod security” icon in the “Security” section of the LWS Panel.

Cache, PHP-FPM and Protection

  • Cache: share of pages served from cache (HIT) or by the server (MISS), and average response time for each.
  • PHP-FPM: duration, memory and processor used by your PHP scripts, with the slowest script and a “Slow (>1s)” filter.
  • Protection: requests blocked by the LWS server protection. A 509 error indicates too many connections or requests (overload protection), a 512 error indicates a triggered security filter (suspicious address, SQL injection, brute force), and the blacklist groups blocked IP addresses.

Find the cause of a 500 error or a blank page

  1. Open the “PHP Errors” tab

    Choose the period covering the time of the problem (“24h”, or more if the error is older) and, if needed, the relevant domain.

  2. Click the “Fatal” filter

    Find the row corresponding to the time of the problem. The “PHP FILE” and “LINE” columns identify the file involved: on WordPress, an address such as /wp-content/plugins/extension-name/ indicates the extension causing the issue.

  3. Request a diagnosis

    Click “✨ AI Diagnostic” at the end of the row, then “✨ Analyze with AI”. After 15 to 30 seconds, the tool explains the meaning of the error, its likely cause and the steps to fix it.

    How to access Apache / PHP logs

Download raw access logs

  1. Click “📦 Raw logs”

    In the “Access & Errors” tab, scroll to the bottom of the page to “Export your data” and click “📦 Raw logs”.

  2. Download the desired file

    Click “📥 Download” next to the file: “nginx.access.log” for today’s log, or the “nginx.access.log-YYYYMMDD.gz” archive for the desired day. Archives cover the last 15 days.

    How to access Apache / PHP logs

To export only part of the requests (for example, 404 errors for a domain), first set the period, domain and filters, then click “📥 Filtered CSV”.

Frequently asked questions

I can no longer find the Error.log and PHP.log tabs

The old “Apache and PHP Logs” screen has been replaced by LWS Log Analyzer. PHP errors are in the “PHP Errors” tab, requests with errors in “Access & Errors” (the “4xx” and “5xx” filters), and firewall blocks in “Mod Security (WAF)”.

I can’t see any errors even though my site shows one

Check the period (switch to “Last 7 days” if the problem is old) and the selected domain in the list. If the “PHP Errors” tab remains empty, look at “Access & Errors” with the “5xx” filter, then the “Protection” tab.

A visitor gets a 406 error

A request blocked by a ModSecurity firewall rule returns a 406 error. Look for the visitor’s IP address or the page address in the “Mod Security (WAF)” tab: if the request is “🚫 Blocked”, note the rule number. The help article How to fix a 406 error and find the source of the problem? explains the next steps.

A visitor gets a 403 error

A 403 error is not returned by ModSecurity rules. Look at the “Protection” tab, then “Access & Errors” with the “4xx” filter. The help article How to fix a 403 Forbidden error on your site? details the possible causes.

My site is slow: where should I look?

In “Access & Errors”, use the “> 1s”, “> 2s” and “> 5s” filters. The “PHP-FPM” tab shows the slowest script and the “Cache” tab shows the share of pages served from cache.

Can I get older logs?

The tool displays at most the last 7 days. Raw access logs can be downloaded for 15 days with “📦 Raw logs”.

Can I copy the logs to my FTP space?

No, the tool does not offer this option. Download them with “📦 Raw logs”, then send them wherever you want.

Who is Albert?

He is the AI assistant for LWS Log Analyzer. Click the 💬 bubble at the bottom right of the screen to ask him a question about your logs, for example “Is my site under attack?” or “Why am I getting 500 errors?”.

Related articles

help.lws.net/a/124
Was this article helpful?

Yes

No

Read 41 355 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.