I'm trying to set up a local WordPress development environment using Apache on Ubuntu 22.04. I followed these two tutorials:
- https://www.digitalocean.com/community/ ... lamp-stack https://www.digitalocean.com/community/ ... untu-22-04
Here's my virtual host configuration (
Код: Выделить всё
/etc/apache2/sites-available/your_virtual_host.confКод: Выделить всё
ServerAdmin d3@gmail.com ServerName wordpress.dev ServerAlias www.wordpress.dev DocumentRoot /var/www/wordpress AllowOverride All ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined - When I access localhost, a blank page loads.
- When I access wordpress.dev or www.wordpress.dev, it redirects to wordpress.org.
- When I access localhost/wp-config.php, I see gibberish code instead of the expected content.
- Accessing localhost/wp-login.php displays login form source code.
What I've tried:
Код: Выделить всё
Restarted Apache with sudo systemctl restart apache2 Additional Information:
Код: Выделить всё
Ubuntu version: 22.04 Источник: https://stackoverflow.com/questions/781 ... dpress-org