* U.S. crude drops below $45 for first time since Aug. 15
* August private job creation slightly better than expected
* Palo Alto Networks drops after disappointing forecast
* Indexes down: Dow 0.29 pct, S&P 0.24 pct, Nasdaq 0.19 pct
By Rodrigo Campos
NEW YORK, Aug 31 (Reuters) - Stocks ended lower on Wall Street on Wednesday, as energy shares tracked oil prices lower, and the S&P posted a loss for August, the first negative month for the benchmark index since February.
The Nasdaq gained 1 percent in August and the S&P shed 0.1 percent, speaking to stocks' resiliency after the S&P hit an all-time high mid-month. It ended Wednesday within 1 percent of its record close.
The energy sector of the S&P 500 ended 1.4 percent lower on Wednesday, its largest daily decline in three weeks, as U.S. crude futures fell more than 3 percent.
Data earlier showed the private sector created 177,000 jobs in August, in line with expectations, and contracts to buy previously owned homes surged in July, suggesting the economy was regaining sufficient momentum for the Federal Reserve to raise interest rates this year.
The strong numbers sharpened the focus on Friday's payrolls report.
"If we get another strong number, that's going to tell you the (Fed) has to raise rates in September all things being equal," said Kim Forrest, senior equity research analyst at Fort Pitt Capital Group in Pittsburgh. "They telegraphed this in the last week, explicitly."
Strong economic data and comment from central bank officials have increased bets that the Fed will raise rates at least once before the end of the year. This has created a shift in stock market leadership, away from defensive, high-yielding sectors and into cyclicals like industrials and technology.
The Dow Jones industrial average fell 53.42 points, or 0.29 percent, to 18,400.88, the S&P 500 lost 5.17 points, or 0.24 percent, to 2,170.95 and the Nasdaq Composite dropped 9.77 points, or 0.19 percent, to 5,213.22.
About 6.82 billion shares changed hands in U.S. exchanges, compared with the 5.98 billion daily average over the last 20 sessions.
Palo Alto Networks dropped 7.2 percent to $133.17 after the cyber security firm late on Tuesday forecast current-quarter profit and revenue below analysts' estimates.
H&R Block Inc was the top percentage loser on the S&P 500, falling 10.5 percent after the U.S. tax preparer reported quarterly revenue that missed analysts' expectations by a large margin.
Declining issues outnumbered advancing ones on the NYSE by a 1.69-to-1 ratio; on the Nasdaq, a 1.73-to-1 ratio favored decliners.
The S&P 500 posted 14 new 52-week highs and two new lows; the Nasdaq Composite recorded 103 new highs and 22 new lows.
Reporting by Rodrigo Campos; Editing by Leslie Adler