Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt for NGINX #21

Open
SteffeyDev opened this issue May 17, 2016 · 0 comments
Open

Adapt for NGINX #21

SteffeyDev opened this issue May 17, 2016 · 0 comments

Comments

@SteffeyDev
Copy link

SteffeyDev commented May 17, 2016

Its not that difficult to figure out, but it would be awesome if the README described how this works with NGINX as well. Basically all you need to do is put these lines in your site's file in /etc/nginx/sites-enabled:

autoindex off;
location /shorten {
rewrite ^/shorten/(.*)$ /location/of/shorten.php?longurl=$1 break;
}

location / {
# there should be things in this block already, such as try_files
rewrite "^/([0-9a-zA-Z]{1,6})$" /location/of/redirect.php?url=$1 last;
}

And then assuming php works correctly, that should be it (after mysql is set up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant