This is way frustrating. I hope someone can help me out with this. When I click on a permalink the pages fail to load and I get this error from Chrome’s console: {“@context”:“http:\/\/schema.org”,“@type”:“WebSite”,“url”:“http:\/\/lineangel.com\/”,“name”:“LineAngel”}
I tried this [https://randomwordpresstips.wordpress.com/2013/05/10/enabling-permalinks-on-wordpress-install-ubuntu-12-10/](http://) with no luck.
a2enmod rewrite is enabled
.htaccess file is set to “chmod 666″
My .htaccess file is:
BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUESTFILENAME} !-f
RewriteCond %{REQUESTFILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
END WordPress
My apache2.conf file is:
ServerRoot “/etc/apache2”
Mutex file:${APACHELOCKDIR} default
PidFile ${APACHEPIDFILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHERUNUSER}
Group ${APACHERUNGROUP}
HostnameLookups Off
ErrorLog ${APACHELOGDIR}/error.log
LogLevel crit
IncludeOptional mods-enabled/.load
IncludeOptional mods-enabled/.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride all
<Limit PUT DELETE CONNECT OPTIONS PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
deny from all
</Limit>
</Directory>
<Directory /var/www>
Options FollowSymLinks
AllowOverride FileInfo
</Directory>
<Directory /usr/share>
AllowOverride all
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch “^.ht”>
Require all denied
</FilesMatch>
AccessFileName .htaccess
<FilesMatch “^.ht”>
Require all denied
</FilesMatch>
LogFormat “%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"” vhost_combined
LogFormat “%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"” combined
LogFormat “%h %l %u %t "%r" %>s %O” common
LogFormat “%{Referer}i -> %U” referer
LogFormat “%{User-agent}i” agent
IncludeOptional conf-enabled/.conf
IncludeOptional sites-enabled/.conf
<DirectoryMatch ^.*/wp-content/uploads/>
AllowOverride all
phpflag engine off
phpadmin_value engine Off
</DirectoryMatch>
<DirectoryMatch ^.*/wp-content/blogs.dir/>
AllowOverride all
phpflag engine off
phpadmin_value engine Off
</DirectoryMatch>
<DirectoryMatch ^.*/wp-admin/>
AuthType Basic
AuthName “Restricted Area”
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</DirectoryMatch>
<VirtualHost *:80>
ServerAdmin webmaster@lineangel
DocumentRoot /var/www
Servername localhost
ServerAlias lineangel www.lineangel
<Directory /var/www/html/lineangel.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
</VirtualHost>
My 000-default.conf is:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request’s Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
<Directory /var/www/html/lineangel.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
</VirtualHost>
vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Any help would be greatly appreciated!
Digital Ocean should really consider a default WordPress droplet which has the URL rewrites enabled by default. This is just standard WordPress stuff and thousands of us have to fumble around with command lines just to get pretty links to work.
C'mon D.O., you can do it!