How do you set txindex to 1? I am using bitcoin.rpc.RawProxy to connect to bitcoind and scrape the data. But I am getting an error when I gettransaction and I have to reindex the blockchain. Thus I am wondering how I set the txindex to 1 so I can reindex and continue.
You can enable the txindex by either adding it to your bitcoin.conf file:

txindex=1


or

You can run bitcoind with the -txindex flag:

$ bitcoind -txindex


See:

$ bitcoind --help

    -txindex
       Maintain a full transaction index, used by the getrawtransaction rpc
       call (default: 0)