Posted by naeluh on June 28, 2013 at 5:52pm
I am trying to install Drupal 8 which I did successfully I am just having a bit of trouble. I a virtual host and in a sub directory I installed d8 but I can only access the front every other page gives me a 404 ?
here is my server config for that directory -
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/toughcom.com/public_html;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.)$ /index.php?q=$1 last;
}
# Make site accessible from http://localhost/
server_name toughcom.com;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ .php$ {
#fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ .(js|css|png|jpg|jpeg|gif|ico)$ {
expires 1y;
log_not_found off;
}
}Can someone point me to the right the direction heres the location of the install
http://toughcom.com/d8/
thanks

Comments
got it to work thanks
got it to work thanks
Hi, Naeluh, can you please
Hi, Naeluh, can you please tell me how to solve this problem? I have same problem as you. thanks
Hi Stanley it was my vhost
Hi Stanley it was my vhost file was configured wrong
here is what I ended up with in the conf in the sites-available folder go ahead and try this it worked for me -
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
# This is the full path to your index file
root /var/www/www.example.com/public_html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
# This will be your domain name
server_name example.com;
location / {
index index.php;
# This is cool because no php is touched for static content
try_files $uri $uri/ @rewrite;
expires max;
}
location @rewrite {
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ .php$ {
#fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Let me know if this works
thanks
Hi, naeluh, Thanks for your
Hi, naeluh,
Thanks for your help. I fixed this problem.
When I noticed the drupal7 I installed hadn't used the clean URL, and drupal8 used the clean URL, I realized this problem may be caused by clean URL setting. So I tried to set the clean URL on my virtual host configration file, it works.
Thanks for your warm help!
Stanley
same problem
hello i enable the clean urls and also run a2enmode rewrite the then restart apache2 services but do not work for me i am using ubuntu 16.04
Are you trying to use nginx
Are you trying to use nginx and apache at the same time? You'll have to pick one or the other.
If you're just looking for help with Apace, you may check out the other posts around here.
same problem need some help.
I using WNMP web server, and here is my config.
worker_processes 1;
error_log logs/error.log;
pid logs/nginx.pid;
events {
# Max value 16384
worker_connections 8192;
# Accept multiple connections
multi_accept on;
}
Settings that affect all server blocks
http {
include php_processes.conf;
include mime.types;
default_type application/octet-stream;
Begin HTTP Server
server {
listen 80; # IPv4
server_name localhost;
}
End HTTP Server
Begin HTTPS Server
server {
listen 443 http2 ssl;
server_name localhost;
ssl_certificate cert.pem;
ssl_certificate_key key.pem;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
} # End HTTPS Server
}